Fixed extract_user_function transform for nested functions

closes #21