Fixes failing unit tests, due to the locale being improperly cleaned up when changed.