The refactor in 3f76d1402d fixed the creation of redundant indexes. Forwardport of 82ce55dbbe from stable/1.10.x
3f76d1402d
82ce55dbbe