Properly handle absence of lo network interface.

Fixes issue 7465.