BUGFIX : search templates only if no match was found

This behaviour was broken by commit 698b97afe52091a4376bb0cd8936a87464546bd5