As far as I can tell. The problem is that your frames don't have an explicit ID and thus the label is used as id and with the version that doesn't work you will have 2 frames with IDs 01 but on different levels. In the first example you also have 2 frames wit ID 01 but these are on the same level and seen as 1 frame.
The construct:
@startuml
frame 01{
}
frame 02{
frame 01 as C{
}
}
@enduml
does work.
The construct:
@startuml
frame 03{
frame 01{
}
}
frame 02{
frame 01{
}
}
@enduml
gives a bit a weird result as here only in frame 03 a frame 01 is seen when naming one of the 01 frames again frame 01 as C
a good / understandable result appears again.
@plantuml wouldn't it be better to have the default frame IDs to be 03, 03.01, 02 and 02.01 in this case?