[BUG #7585] Improve error message if a model class could not be found.