A few improvements to the new check_for_hostspec() function.