On any script (including my own) these two does not work together since yesterday. I tried many combinations of python pwb.py script -file:"articles_that_need_template.txt" -search:"-insource:/\{\{template/i", but none of them works, every time the script operates on articles even if the template is inside and ignores CirrusSearch's insource at all. It also stopped working on older versions of Pywikibot (where it clearly worked before). It looks like the problem is somewhere in between. CirrusSearch on WIkipedia works as expected too. Maybe some bug/latest change of behavior in MW API? Or some error on MW servers?
Note: I always use the newest code from Gerrit (using git pull --all)
Note: CirrusSearch hastemplate doesn't work too, but it is caused maybe by some other bug (see T155292)
Example. This code should not do anything, because I try on a list of articles to change word kategorie to word whatever, but also I exclude articles containing the word kategorie: