Add test to make sure we restore the locale properly.