Fix a bug related to receive statements

If an unknown message is associated with a blockingreceive statement,
care must be taken so that it is not swapped with the message
that unblocks the receive.