Fixed #5518 (FP regression in 1.64: Array accessed out of bounds)