HPCC-12285 Fix set index ranges

Signed-off-by: JamieNoss <james.noss@lexisnexis.com>
One of these LINK(ds2) is too many

try running the regression test under valgrind to check for leaks.