Workaround occasional BoundsErrors.