fix(orderBy): sort by identity if no predicate is given

Closes #5847
Closes #4579