Fix bug in adding parent of root in index.

TBR

@devoncarew