Fixed bug where DependencyTree could infinitely recurse on cyclic graphs.