Revert "ENH: avoid declaring a new template if the detection is the template itself"
This reverts commit 392e7f39
changed back to old version as the fix introduced the problem of not having the templates in the detection file, which causes problems for magnitude calculation.