Fix issue #7169
If removing multiple attributes, remove the indices in descending order, so it does not get confused