[FLINK-1315] [optimizer] Extra test reproducing the IllegalStateException bug in bulk iterations.
[FLINK-1315] [optimizer] Fix bug in branch tracking logic.