It turns out that "Temporary failure in name resolution" is the error EAI_AGAIN, which getaddrinfo() returns when it doesn't really know what the problem is. It was failing because I was running nslookup as root but the application was running under a user account, and by mistake only root had read permission for /etc/resolv.conf. Once I did a chmod everything worked.
To fix this permanently we added a chmod to /usr/libexec/udhcpc.sh so the permission on /etc/resolve.conf is set correctly when it's created.