Script knows how to return its transitive successors.
added analysis for trees