simplified flattening lemma, via some new lemmas elsewhere