Fix compilation after recent changes. Generalize coerce so that we don't need three different versions