make rewriting away the gen_fmaps more robust