CheckCompilerFlag: Fix regression in locale environment preservation
Fix a typo from commit 660e0d80 (internal/CheckCompilerFlag: rely on common configuration, 2022-01-12, v3.23.0-rc1~124^2~1) that caused locale environment variables to not be restored after they are set during the check.