Add missing aliases to order by clauses