Odd glyph sorting

I have “Keep alternates next to base glyph” checked, and the following glyphs sorted in this order:

lam_alef-ar
lam_alef-ar.1
lam_alef-ar.fina
lam_alef-ar.fina.1
lam_alef-ar.fina.2
lam_alef-ar.2

But I expect lam_alef-ar.2 to be right after lam_alef-ar.1 instead of the current order. If I add 0 before the number (i.e. 01, 02, etc.) I get the expected order:

lam_alef-ar
lam_alef-ar.01
lam_alef-ar.02
lam_alef-ar.fina
lam_alef-ar.fina.1
lam_alef-ar.fina.2

The “Keep alternates next to base glyph” used the suffixes backwards (among a few other things).