Fix compilation of define to prevent expressions to refer to the identifier being defined.
Fix a bug that caused lambda-parameters to stay in scope after the end of the lambda-expr.