Might be worth a try to do the removal with in the bounds of a transaction. Otherwise it might treat each remove action as part of the undo stack that might be leading to the infinite loop warnings. I actually need to try this later as well because I want to implement baking on every nth frame.