correct incorrect prefixing of edges when relevant nodes are in a subgraph