patch 8.2.3334: Vim9: not enough tests run with Vim9

Problem:    Vim9: not enough tests run with Vim9.
Solution:   Run a few more tests in Vim9 script and :def function. Fix
            islocked().  Fix error for locking local variable.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index eb26190..d6a7e0a 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -7433,7 +7433,7 @@
     // Cannot use :lockvar and :unlockvar on local variables.
     if (p[1] != ':')
     {
-	char_u *end = skip_var_one(p, FALSE);
+	char_u *end = find_name_end(p, NULL, NULL, FNE_CHECK_START);
 
 	if (lookup_local(p, end - p, NULL, cctx) == OK)
 	{