Another attempt at #889.

The packet was being sent after the state was adjusted, so another thread *may* have sent another packet in the meantime.