Clean up handling of <template>.