Fix capturing of function expressions.