XWIKI-11452: The document path in the Document Index Tree is still not correctly computed
* Use a stack to compute the document path recursively.