https://bugzilla.wikimedia.org/show_bug.cgi?id=55260
--- Comment #4 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- Yes, it's related to templates. Here is a test case.
1. Create "Template:Pywikipedia test" containing:
Hello.<includeonly>[[Category:AABBCC]]</includeonly>
2. Create an article "test" containing:
{{pywikipedia test}}
3. Run: $ python category.py move -from:"AABBCC" -to:"DD"
The output shows that Pywikipedia gets confused and can't modify the category tag inside the template:
Target page Category:DD already exists! Getting [[Category:AABBCC]]... Getting 1 pages from vistawiki:en... ERROR: [[Test]] is not in category Category:AABBCC! Getting [[Category:AABBCC]]...