Do you need this? If node.children.size == 0, then node.children.each will not call block