Fix race condition between instance drop and participant history update (#2073)