accept_state_change_and_log() must be placed before it is called.