Prevent changing the state in the buffer which triggered the state change.