Fix flatten to a depth of 0