Fix a bug in flatten_iterative when two domains overlap