I considered checking for the 2-letter version here too. But the corner cases abound. What it, for example, LANGUAGES was:
en_AU.utf8:en_GB.utf8:en_US.utf8
Checking en after en_AU is not found would result in skipping en_GB.
Of course, if we check all the long versions, then check the 2-letter versions, we'd probably be OK. Maybe CJL can comment?