RD
is returned as a pseudo-country code for reserved IP addresses.
This includes things like private addresses, class D and E networks (IPv4) and loopback.
For a complete list of addresses that will return this value, see here.
I can't actually find this behaviour documented anywhere, but experimentation easily demonstrates that this is the case, and moreover the <CountryName>
element is populated with the word "Reserved" in these cases.