TRQ-1908. Fix an unhandled exception around retrieving a hostname form the cache.