Fixed retrieve_disjoint_paths to deal with non-node-disjoint situations.