Properly restore the LC_NUMERIC locale after finalizing.