Not many people are aware of how the second param to `array_keys` works, and the `array_shift` looks awkward.

Since we only want a single value anyway, just use `array_search` with a ` $rawOffset === false` test for not found. Then get rid of the `array_shift`

I'll merge this if you make those changes, unless you think there is a good reason to keep it as it.