enhance modifyLimitQuery

fields in an ORDER BY clause of outer query must be in SELECT clause of sub-query