Avoid O(N^2) re-indexing

updateindex.sh is run by each engine, so it only
needs to re-index data for that engine.
Merge branch 'master' into master-deb6

* master:
  Avoid O(N^2) re-indexing