Generic flatness lemma