What I find amusing is that the code for reading that .pam_environment file is broken: https://git.launchpad.net/ubuntu/+source/accountsservice/tre...
Basically, if the LANG and LC_ALL appear are across two 50 byte regions of the file, it'll fail to find them.