Rejigging the filter to search for templates correctly.