See URL for an example. The source is like this:
Text<ref>[[Category:Test]]</ref>[[Category:Test2]] <references /> {{DEFAULTSORT:Sortkey}}
Expected result:
In both categories the article should be put under S.
Actual result:
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 T4700.
Version: unspecified
Severity: minor
URL: https://de.wikipedia.beta.wmflabs.org/wiki/Ref-sort