Only include the appropriate router direction when adding routers to results in transitive_sources and transitive_targets.