Remove redundant Vec in `get_and_clear_pending_msg_events`