Replace in_array( array_keys( ... ) ) with array_key_exists( ... )

It's the same, right? in_array() must search for a value and therefor
is expensive. array_key_exists() searches for a key and should be
much cheaper. Also easier to read.

Change-Id: Ide17d5af13c416c62a40029848ac17ba24eb5563
Merge "Replace in_array( array_keys( ... ) ) with array_key_exists( ... )"