Added exhaustive gate reconnection test.