Fix the index build with LSI
Merge pull request #1045 from mojombo/fix-lsi-build

Fix the index build with LSI. Fixes #1039.