use updated networkx topo sort interface and require that the root node is actually in the tree even if the tree has no branches