Fix alias expand for hostnames, it should fix #2941