strip top-level comments as well as text nodes in anonymous templates
fixes #58