A bug in the model builder leads to crashes when the nominal path is invalid. This MR makes it emit an error instead.