Index: generic/tclEnv.c
==================================================================
--- generic/tclEnv.c
+++ generic/tclEnv.c
@@ -563,11 +563,16 @@
     if (flags & TCL_TRACE_READS) {
 	Tcl_DString valueString;
 	const char *value = TclGetEnv(name2, &valueString);
 
 	if (value == NULL) {
-	    return (char *) "no such variable";
+	    if (Tcl_GetVar2Ex(interp ,name1 ,name2 ,0)) {
+		if (Tcl_UnsetVar2(interp ,name1 ,name2 ,TCL_LEAVE_ERR_MSG)) {
+		    Tcl_Panic("could not unset var:%s %s" ,name1 ,name2);
+		}
+	    }
+	    return NULL;
 	}
 	Tcl_SetVar2(interp, name1, name2, value, 0);
 	Tcl_DStringFree(&valueString);
     }
 

