patch 8.2.0150: cannot define python function when using :execute

Problem:    Cannot define python function when using :execute. (Yasuhiro
            Matsumoto)
Solution:   Do not recognize "def" inside "function.
diff --git a/src/userfunc.c b/src/userfunc.c
index 808ed96..ce776ee 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -2667,8 +2667,11 @@
 		indent += 2;
 
 	    // Check for defining a function inside this function.
+	    // Only recognize "def" inside "def", not inside "function",
+	    // For backwards compatibility, see Test_function_python().
 	    c = *p;
-	    if (checkforcmd(&p, "function", 2) || checkforcmd(&p, "def", 3))
+	    if (checkforcmd(&p, "function", 2)
+		    || (eap->cmdidx == CMD_def && checkforcmd(&p, "def", 3)))
 	    {
 		if (*p == '!')
 		    p = skipwhite(p + 1);