Bounds checking for ReferenceArray.shallowCopy.