fix failing tests that break the length of the index set on removal

also, removeIndexes was broken