It looks like you found a bug! As community we cannot help you fix this, only try some work-arounds. However, I would advice to submit a ticket for support (https://support.mendix.com).
I think it has to do with the reference set you are retrieving it from: does it work when you retrieve directly from database/XPath?
As a workaround you could use as datasource a MF. Within the MF you retrieve your data and create a sorted list which you can return.
not sure if this is a bug. some pointers;
These a just thoughts. Use them to test/investigate further; if you have more answers let us (the community) know.