Quoting Daniel Burrows <dburrows@debian.org>:
Do you have nscd installed? That often seems to be at the root of weird name resolution problems. Daniel
Unfortunately, I don't have nscd installed. Omar