Add some assertions to ensure that the target array doesn't get accessed
out of bounds.

Obtained from:	Netflix, Inc.
MFC after:	3 days