BUG: Manage LC_MESSAGES with an object
This moves management of the LC_MESSAGES environment variable into an automatic variable. Previously if an error occurred the original environment value was not restored. This makes the fix to issue #5936 more robust.
Showing with 44 additions and 25 deletions