reindenting and removing tmpl_if in doc-head-close