https://bugzilla.wikimedia.org/show_bug.cgi?id=55221
--- Comment #3 from Kunal Mehta (Legoktm) legoktm.wikipedia@gmail.com --- I made some experiments. I think the problem is in textlib.py. replaceCategoryLinks calls removeCategoryLinksAndSeparator
I suspect that removeCategoryLinksAndSeparator removes these categories but nobody puts them back because they are not explicitely listed as categories.