Register CategoryTreeMagic from global scope instead of setup
I don't know how or why, but this late way of registering magic
words from within an extension setup function is sometimes
causing people's install to fatally crash on:
Exception from line 318 of mw/includes/MagicWord.php:Error: invalid magic word 'categorytree'
Just move it out of there into a plain and simple registration.
The parser function itself is still registered conditionally.