Fix Template::getAttr method; now correctly calls methods and closures