The Linux kernel does not forward certain ICMP errors to userspace unless IP_RECVERR/IPV6_RECVERR is specified. We should use this socket option in the DNS stub resolver, as suggested in the upstream bug.
We are not going to backport this further.