Issue 9457 - isSorted(string) does not work.

http://d.puremagic.com/issues/show_bug.cgi?id=9457

Fix by bearophile.

If anyone can come up with more thorough test-cases please add them here. This is a regression and blocks 2.062 release.