Fix a cause of state resets in room versions 2 onwards.