Now it prevens cyclic flips and addresses #283

What did this line fix?