fix for assign-element-after-array-end crash