MPS-19270 Consistency Problem without Transient Models: pre-processing scrip that modifies model with in-place on didn't report changes to IncrementalDependenciesBuilder (needToCloneInputModel used to be true if any script was in 'write' mode, with in-place optimization only when transients saved). The script from the defect replaced all elements in original input model with new roots, that's why there are stale (model == null) keys in the incremental map.
Since we need to distinguish modifiesModel from needToClone, ScripManager refactored to pull the check upwards. There's no longer need to check model for being transient as all generator models are now transient.