HPCC-10784 Keyed limits on stepped indexreads can be miscalculated

Fix errors in thor following the Roxie fix in this area.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
HPCC-10784 - Fix minor issues spotted in review

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #5399 from jakesmith/hpcc-10784

HPCC-10784 Keyed limits on stepped indexreads can be miscalculated

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>