To do so in a graph based approach, one needs to keep separated the paths of different lengths ending in a given node.
only paths of the same length ending at a given point, with different predecessors, should be recombined so that disruption can be considered properly in subsequent steps of the algorithm.