Looks similar to bug 17988.
This wikitext snippet fails.
A[[Category:B]]
[[B]]C
Version: 1.21.x Severity: normal