Fix inserting category links from non-parser function extensions

Found due to crashing in [[en:Wishing_Tree]] revid 625547305.

Change-Id: I84ac4773102be18a461f8bc7d3eb227beef0b83f