Support lambda functions with local scope and varargs