HPCC-10555 Fix Out of Bounds array access

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>
Merge pull request #5238 from garonsky/HPCC-10555

HPCC-10555 Fix Out of Bounds array access

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>