Fix issue #1041 in simple_cycles. Add test.

Reset the closed status of nextnode so it doesn't get unblocked
prematurely.