Problem delete massive tracks with collapsed groups not work

I think it has to do with the error fixed here.Expanded works, not expanded does not work

Ah, OK. Yes, some quirks were discovered when duplicating groups. Maybe a similar thing happens when removing?

Will need to take a look at this as well.

But otherwise, what I said still holds true: when you’re removing items from an array that you’re also iterating through, you need to use a reverse counter or ripairs (“reverse ipairs”).