Revert "Cleanly relinquish template file resources"

This reverts commit 9822433568bf9e40a927b31ee4e069c3c78cb05a.