Fix bug #11288 with overrunning array limits.