See URL for an example. The source is like this:
In both categories the article should be put under S.
Only in Category:Test2 the article is under S, in Category:Test it is sorted as its title says.
When you put the DEFAULTSORT before the <references/> it works as expected.
I don't know how this is handled internally, so this could be just a duplicate of bug 2700.