HPCC-12285 Fix set index ranges

Signed-off-by: JamieNoss <james.noss@lexisnexis.com>
I don't think this test is right.  Is it trying to optimize indexing a NULL set?  I  don't think it should be here, and there is no guarantee that array is a constant anyway.