Check sender when receiving from a process

If it's the wrong sender, keep looking through the queue then put the
original message back at the end of the queue.

(There is probably a better way. I haven't convinced myself that this
won't accidentally cause a deadlock. Intuitively it seems not since we
follow a specific protocol and we'll just move on to the next expected
sender anyway.)