$folded_id can be NULL but is not checked in fof-db