dns_link_resolution() can be called with the server lock already held, so don't attempt to lock it again in that case.