Fix issue #1041 in simple_cycles. Add test.

Reset the closed status of nextnode so it doesn't get unblocked
prematurely.
Merge pull request #1042 from dschult/simple_cycles_bug

Fix issue #1041 in simple_cycles. Add test.