Fixed DAGVisitor behavior