ignore surrounding template if inside a ref-tag