[FIX] models: do not look up the registry class when building cls._fields

Fixes #3037