Best preferred host handling (fixes #6).