Optimize Service::GetHost.

Refs #5049