Fix handling of function expressions