This should go away.  If nsswitch resolution fails, gethostname bare is the only thing we can rely on.