Fix for #2256 "Indexes aren't updated properly when removing columns"