Apply transitive closure to frame hierarchy.