fixed dynatree bug, where the tree wasn't loaded after ng-if