If there is a DNAT rule in the PREROUTING chain like this one:
iptables -t nat -A PREROUTING -j DNAT --to-destination x.x.x.x
All packets reaching the stack from a network interface will first pass through the PREROUTING chain (after conntrack and ignoring raw/mangle/security tables) and will get their destination address patched to x.x.x.x.
My question is: When do response packets from x.x.x.x get their source address patched back with the inverse operation so that it now appears that these packets are sent by the original destination of the first packets and not x.x.x.x?
My guess is that it's done as soon as possible so that nat rules are 'transparent' to other rules in other chains.