Handle block closing tags in template.