patch 8.1.0177: defining function in sandbox is inconsistent

Problem:    Defining function in sandbox is inconsistent, cannot use :function
            but can define a lambda.
Solution:   Allow defining a function in the sandbox, but also use the sandbox
            when executing it. (closes #3182)
diff --git a/src/ex_cmds.h b/src/ex_cmds.h
index 48b0253..045bfcb 100644
--- a/src/ex_cmds.h
+++ b/src/ex_cmds.h
@@ -584,7 +584,7 @@
 			EXTRA|NOTRLCOM|SBOXOK|CMDWIN,
 			ADDR_LINES),
 EX(CMD_function,	"function",	ex_function,
-			EXTRA|BANG|CMDWIN,
+			EXTRA|BANG|SBOXOK|CMDWIN,
 			ADDR_LINES),
 EX(CMD_global,		"global",	ex_global,
 			RANGE|WHOLEFOLD|BANG|EXTRA|DFLALL|SBOXOK|CMDWIN,