Sorry, I guess I could have worded that better - it doesn't 'strip' leading zeroes, it just ignores them as it's doing a numerical comparison.
In any case, the change I added seems to make the sort identical to the Tcl dictionary sort. I'm not sure about yours.