Huh, so this works locally for me and probably for testing too because MySQL determines whether equality comparisons are case-insensitive or not based on the database's collation. Good catch.

My suggestion above is actually borken and should not be used because of this, but my greater point is that we can't have Client Match Rules that match a custom locale that begins with a valid locale using the current rules (this is a super-edge case which is why I don't particularly care for the initial release). 

Consider a snippet that has a Client Match Rule to match the locale `en-us-fake-locale`. When a user visits with that locale, the code above will search for it in `LANGUAGE_VALUES` and match it to `en-US`, and then filter out any snippets not available in `en-US`, even though the snippet may not be enabled for the en-US locale to avoid being delivered to users in that locale.

However, what you have here currently is probably the best we can do for now. Yay!