patch 8.2.1980: Vim9: some tests are not done at the script level

Problem:    Vim9: some tests are not done at the script level.
Solution:   Use CheckDefAndScriptSuccess() in more places.  Fix uncovered
            problems.
diff --git a/src/list.c b/src/list.c
index b62c141..1a82a34 100644
--- a/src/list.c
+++ b/src/list.c
@@ -1264,7 +1264,7 @@
 	had_comma = **arg == ',';
 	if (had_comma)
 	{
-	    if (vim9script && !IS_WHITE_OR_NUL((*arg)[1]))
+	    if (vim9script && !IS_WHITE_OR_NUL((*arg)[1]) && (*arg)[1] != ']')
 	    {
 		semsg(_(e_white_space_required_after_str), ",");
 		goto failret;