Remove extraneous expression from line 1681;
remove shortcut tests added in cd45ebb0c3015556d782bbbfdee1658f227b3eef, as they were too aggressive;
fix bugs 2445, 2430, 2427, 2421. These were due to the conversion to cgraph, so there may be more
bugs fixed than these. The problem is that with cgraph, edges always come in pairs. In particular,
to access the head and tail of an edge, both parts need to be set. This wasn't being done for
the temporary hack edges in make_regular_edge.