Handle .local in domains better (undef fix)

The public domain search can return undef, if the current host is not in
a public domain at all (ie, `foo.local`).  Deal with the consequences.