Remove the unneeded index drops and add in containment checks.