Ensure consistent results when using limit and offset. 2

Resubmitting to 4_5_x:
https://github.com/xtuple/xtuple/pull/1428