Error when lambda parameter has incompatible direction with the delegate

Fixes bug 740894