Add guard to avoid misleading error message
What does this MR do?
Very small follow-up to !19362 (merged). It adds a guard clause to only drop the bogus index if it actually exists. This avoids a possibly confusing error message in case the index doesn't exist.
Based on suggestion from @stanhu here: !19362 (comment 238058737)
Edited by 🤖 GitLab Bot 🤖