Fix for issue #8387. Also: Add a new line to /etc/locale.gen if the specified locale wasn't listed.