Here are my results:
========================
Making resolv.conf empty
Results of looking up www.google.com: status = -11, errno = 111
Results of looking up a bogus name: status = -11, errno = 111
Writing nameserver option to resolv.conf
Results of looking up www.google.com: status = 0, errno = 101
Results of looking up a bogus name: status = -2, errno = 101
Making resolv.conf empty
Results of looking up www.google.com: status = -11, errno = 111
Results of looking up a bogus name: status = -11, errno = 111
Writing incorrect nameserver option to resolv.conf
Results of looking up www.google.com: status = -11, errno = 110
Results of looking up a bogus name: status = -11, errno = 110
========================
This is an almost-sid box with libc6 2.17-5. The results are consistent
with my earlier observations.
My system above has [...]:
hosts: files gw_name dns
[...] So maybe mdns is to blame here for part of the trouble? Can you
verify that really the last mdns4 entry makes up for the difference?