Add sensible error messages when working with classes that depend on unbound types.