Fix parent URI retrieval.
Fix NPE in index entry creation.
Fix tests