Stop searching for local cuts as soon as we find a suitable one.
Avoid deepcopy in transitive_clousure.