But if the code is removed completely, it will still give a sensible error message!
This is really just a question about wording of the error message. You get a more sensible error message if you remove the code completely. It doesn't need to mention that 'invariant' meant 'immutable' for a brief period.