MODE-2267 Fixed the problem that [jcr:name] and [mode:localName] were switched in the indexes.

This PR should be merged in `3.x` and `3.8.x-prod-ip6.1`