The issue at the moment is that a lot of the consistency checking is being done when parameters are being set. While this should be the case for sanity checking, consistency checking parameters is more delicate because one may end up in an inconsistent state while setting a parameter and then removing the inconsistency in the next step. So it's ok for the state to be inconsistent when setting parameters, as long as it's fixed when the file is eventually written out.
The issue at the moment is that a lot of the consistency checking is being done when parameters are being set. While this should be the case for sanity checking, consistency checking parameters is more delicate because one may end up in an inconsistent state while setting a parameter and then removing the inconsistency in the next step. So it's ok for the state to be inconsistent when setting parameters, as long as it's fixed when the file is eventually written out.