Moved index drop out to another file.

* This should actually detect necessity now.

(cherry picked from commit 5896aa35c4d84791b5793534a9e5f690e33bb2e3)

Change-Id: I928d43dd3a6877b96e29bac2386e2d8b77a3d5d2
Merge "Moved index drop out to another file."