Issue #5837: Certain sequences of calls to set() and unset() for
support.EnvironmentVarGuard objects restored the environment variables
incorrectly on __exit__.

Fix this by recording the initial value of each environment variable on the
first access in set() or unset().
diff --git a/Misc/NEWS b/Misc/NEWS
index 472c7e6..28ddebb 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -875,6 +875,10 @@
 
 - Issue #5083: New 'gui' resource for regrtest.
 
+- Issue #5837: Certain sequences of calls to set() and unset() for
+  support.EnvironmentVarGuard objects restored the environment variables
+  incorrectly on __exit__.
+
 
 What's New in Python 2.6 final
 ==============================