improvements to host/gen escaping in longest match blocks
removed the nested host hack
fixed the switch to host statement