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>