Remove defined template before filtering if found