Switch order of skip and limit clauses.

The generated query was causing cryptic 400 errors. Investigation revealed that it was the ordering of the skip and limit clauses. Skip needs to come *before* limit when both are present.