Detect failed gethostbyname, refs #2449