Restoring the correct functioning by imposing the exit condition also
for non-bezier edges.