Handle two-node cycles.