Correct test for successful fqdn lookup in template