Have you cached it?
Take a look at my UserCP Referral mod, it's probably as basic as can be found.
Makes a template, then makes it display in UserCP, at a non-editable hook location.
--------------- Added [DATE]1261944217[/DATE] at [TIME]1261944217[/TIME] ---------------
Oh, hang on. I would think that the first line in your snippet needs the actual template name, rather than $templatename.