Reverting secondary indexing support to fix the build.

Original code is still available at SHA 1a11cb5f0280a2e404a79a0a8877f906ef526c22, so people can work on getting it in "the right way"