LPS-34076

This pull request brings in missing functionality for sorting (a defect).
To fully test the sorting out, a pre-existing defect with the same root cause, LPS-34501, must be solved as well (not currently contained in this pull request).