I'm not sure how I managed to construct a system that doesn't have this set, but it can happen according to the pygobject API reference, so this once it hopefully isn't only me.
Should this occur, we hit this code with lang set to None - I get a constantly-restarting lightdm as a result, having to rely on journalctl -xe to even see the exception.