Treeportlet: Only try to load the tree if there is a treeportlet.

@lukasgraf This fixes a JavaScript error on views without the treeportlet.