Fall back to for-loop `indexOf`.
This appears to solve some strange behavior where `indexOf` is returning -1 even though the value is present in the array.