Simplification of ptree index reverted - did not work.

Setting elem-id to unique value and org-elem-id to NIL did not work with
simplified version.