treeexec no longer assumes leaves are functions