BUG: Update index generation.

Use modern commands that work more reliably.

Change-Id: If98bd6d0fb958cbf0096b99ae58e6fc33b999f73
Merge "BUG: Update index generation."