patch 8.2.0311: Vim9: insufficient script tests

Problem:    Vim9: insufficient script tests.
Solution:   Add tests.  Free imports when re-using a script.
diff --git a/src/scriptfile.c b/src/scriptfile.c
index 09548d8..9c644e2 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1284,6 +1284,9 @@
 		di = HI2DI(hi);
 		di->di_flags |= DI_FLAGS_RELOAD;
 	    }
+
+	// old imports are no longer valid
+	free_imports(sid);
     }
     else
     {