Templates can be nested so we need to look at host recursively.

Fixes https://www.w3.org/Bugs/Public/show_bug.cgi?id=20127 better