[generic] Drop indexes only if they exist (closes #167781). [applied]