For ICMP received in response to ones sent out, the tag of the packet is simply set to the tag of the connection. The connection record is updated when the outgoing packet is seen: