HPCC-10555 Fix Out of Bounds array access

Signed-off-by: Gleb Aronsky <gleb.aronsky@lexisnexis.com>