from trunk: Match the query in DNS replies to the query in the request; from Vsevolod Stakhov svn:r932