Fix for wrong-order index shift

Shifting indices before the removal of items can cause the wrong items in the derived collection to be removed in certain edge-cases.

Modifies existing remove unit test and adds a new regression test specific to this problem.