Fix problem with extendsTo and custom key types

Should fix a problem with propagating identifier field types to an
extended model.