Fix bug which casued rejected events to be persisted with the wrong room state.