Fixed 'Bug 24015 - Sort usings yields strange result'