A list was being accessed from one thread when it wasn't guaranteed to be empty. PiperOrigin-RevId: 529102141