fixed:
 - order by clauses not working if they are the only thing in the query
 - order by clauses not working if they appear before an auto-tuple occurs that renames the table alias