HPCC-10784 Keyed limits on stepped indexreads can be miscalculated

Fix regression in prior attempt to fix this (,LOCAL indexes broken).

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
HPCC-10784 Keyed limits on stepped indexreads can be miscalculated

Fix other issues spotted in code review (which might review in spurious LIMITs
being reported in ,LOCAL files).

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #5410 from richardkchapman/indexcount-regression

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