Some bugfixes around the index to make it work with a configured index
based on xPath.