[FLINK-1167] Handle unions at the root of the iteration