Simulation plugin: improved the speed with which we check that constants and/or states have been modified.