Fix bug with sorting in the backend with contenttypes that have a 'grouping' (like "chapters")