User-defined functions now create scopes