if a subquery is used, move order_by's on the current model to the subquery. Closes #235