allow tree with many elements

count($this->getDocumentChildren($manager, $document)); is now removed - uncommented the less perfect but still better working other solution