Allow for anonymous functions; fix getFunctionStack