Add ability to switch to index ids late. am: f3677471a5
am: baa3513e85

Change-Id: Idbd7f0b7792fb17fe1a43a2d152cb74b42ef84a8