patch 9.0.1573: error for function name has wrong line number

Problem:    Error for function name has wrong line number.
Solution:   Set the line number before giving the error.
diff --git a/src/testdir/test_vim9_func.vim b/src/testdir/test_vim9_func.vim
index ecdbd5e..852f3a7 100644
--- a/src/testdir/test_vim9_func.vim
+++ b/src/testdir/test_vim9_func.vim
Binary files differ
diff --git a/src/version.c b/src/version.c
index 0d0099c..c07afca 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    1573,
+/**/
     1572,
 /**/
     1571,
diff --git a/src/vim9execute.c b/src/vim9execute.c
index 8e27166..921e2ca 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -4448,6 +4448,7 @@
 		    CLEAR_FIELD(ea);
 		    ea.cmd = ea.arg = iptr->isn_arg.string;
 		    ga_init2(&lines_to_free, sizeof(char_u *), 50);
+		    SOURCING_LNUM = iptr->isn_lnum;
 		    define_function(&ea, NULL, &lines_to_free, 0);
 		    ga_clear_strings(&lines_to_free);
 		}