Added additional checks of the allowed dimensions in submodels