diff --git a/src/core/graph.ts b/src/core/graph.ts index db2190e14..3a3a72ae2 100644 --- a/src/core/graph.ts +++ b/src/core/graph.ts @@ -397,7 +397,9 @@ export class SortablePrecedenceGraph< } else { // Look further upstream for start nodes that match the type. for (const newStartNode of pg.getDownstreamNeighbors(node)) { - startNodes.add(newStartNode); + if (!visited.has(newStartNode)) { + startNodes.add(newStartNode); + } } } }