Fix regression in /etc/hosts

Fixes #2520 
Closes #2524 


ping @crosbymichael