The array-math rewrite folded `function f(x){…}\n-50 + 100` into
`__add(__sub(function f(x){…}, 50), 100)`: the declaration became a function
expression operand, the result was NaN and the property fell back to its
static value. In ECMAScript an expression statement cannot start with
`function`, so at statement start it is a FunctionDeclaration that ends at
its `}`. The rewriter now emits a function in statement position as a
declaration on its own and never as an operand of what follows; function
expressions (after `=`, `(`, `,`, `:`, `return` …) stay operands.
The empty expressionError for evaluation errors is tracked in #3219.
Fixes#3212