patch 8.2.2325: Vim9: crash if map() changes the item type

Problem:    Vim9: crash if map() changes the item type.
Solution:   Check that the item type is still OK. (closes #7652)
            Fix problem with mapnew() on range list.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 85f8bef..1abcd5e 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -1930,6 +1930,15 @@
 }
 
 /*
+ * Return TRUE if "idx" is for the map() function.
+ */
+    int
+internal_func_is_map(int idx)
+{
+    return global_functions[idx].f_func == f_map;
+}
+
+/*
  * Check the argument count to use for internal function "idx".
  * Returns -1 for failure, 0 if no method base accepted, 1 if method base is
  * first argument, 2 if method base is second argument, etc.  9 if method base