Yes, you are most likely correct that it has to do with the number-precision/string-conversion issue(s). Obviously, it's a really bad idea to use subscripts like that. If you are going to I think that using $Query() might be a viable option:

TEST> k A s A("12345678901234567890")="",A(99)="",A("12345678901234567890def")=""
TEST> s B="A" F i=1:1:10 S B=$Q(@B) Q:B="" zwr B
B="A(99)"
B="A(""12345678901234567890"")"
B="A(""12345678901234567890def"")"

Your best bet is to just ensure that the subscripts are ALWAYS treated as strings:

TEST> k A s A("\12345678901234567890")="",A("\"_99)="",A("\12345678901234567890def")="" s B="" F i=1:1:10 S B=$O(A(B
)) Q:B="" zwr B
B="\12345678901234567890"
B="\12345678901234567890def"
B="\99"

But, the slickest (slimy-est?) workaround I found is:

TEST-oes> k A s A("12345678901234567890")="",A(99)="",A("12345678901234567890def")="" s B="" F i=1:1:10 S B=$O(A(B)) Q:B
="" s c=+B zwr B
B=99
B="12345678901234567890"
B="12345678901234567890def"

Go figure...
-bob