Writing out exact matching tileflags