Avoided leaking warning filters.
Removed obsolete hack to run template tests.