Merge auto-index fixes. Fixes #7899.

svn path=/; revision=83132