Throw an exception if a reference doesn't define a model