[WIP] Fix EZP-23129: sorting by field filters the result set

This PR resolves issue https://jira.ez.no/browse/EZP-23129