HPCC-10555 Fix Out of Bounds array access

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

HPCC-10555 Fix Out of Bounds array access

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>