Answer
Use the plain reference field name (e.g. CF$_MODEL_REF) as the source key, and the underlying _DB-suffixed column (e.g. CF$_MODEL_REF_DB) as the destination key — not the other way around, and specifically don't use the _DB-suffixed column as the source. Reference-type persistent custom fields generate this pair of columns because of how they're implemented internally, and getting the source/destination assignment backwards (or using the _DB column as source) is what produces the 'Invalid Type definition' error.