Bug: Animation Modifier looping over curves

I encountered a bug in the anim modifier system in 4.26. I want to iterate over all curves and remove those curves that are not in a stored array. This works, but it does not iterate over all curves… using the metahuman face there are over 1.000 curves. After a few hundred the animation modifier stops as you can see in the screenshot (I output the remaining length of the array when the foreach loop is complete). So I have to let it run several times.

I haven’t found any restrictions regarding the number of curves in the docs, so I guess this is unintended behaviour

Hi, have you solved this problem ?