Steps to reproduce:
- Open any template (tested on cswiki)
- Open "What links here" page
- Filter results to transclusions only
- Open search page and search hastemplate:xyz (where xyz is your chosen template) in all namespaces
- Open search page and search insource:/\{\{xyz/i (where xyz is your chosen template) in all namespaces
Expected results:
All three listings should be the same (only insource could contain commented or nowiki's occurrences)
Current results:
Many of templates get a much smaller list for hastemplate than for other two possibilities. It behaves badly even for exclusions (by -hastemplate:xyz). This is ok for usual search, but e.g. if you exclude them when including templates using a pywikibot (by -search:"-hastemplate:xyz") it is not good, see this edit for instance