LUN-1594: fixed getting last position in the root nodes.
Merge pull request #9 from pbs/LUN-1594

Lun 1594