Improve error messages for nonexistent fields when building and defining factories.