Fix a potential issue where servers could request events for rooms they have not joined.