patch 7.4.2143
Problem:    A funccal is garbage collected while it can still be used.
Solution:   Set copyID in all referenced functions.  Do not list lambda
            functions with ":function".
diff --git a/src/eval.c b/src/eval.c
index 1adbabc..45b8f07 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5304,6 +5304,9 @@
     /* function-local variables */
     abort = abort || set_ref_in_call_stack(copyID);
 
+    /* named functions (matters for closures) */
+    abort = abort || set_ref_in_functions(copyID);
+
     /* function call arguments, if v:testing is set. */
     abort = abort || set_ref_in_func_args(copyID);