Fix a longstanding bug where back pagination over federation could get stuck if it failed to handle a received event.