Yes, I wrote "speedbakes" because in Plane Maker we only have "speedbakes" but we know, It's about GROUND SPOILERS too)
But, however, I think in this case, when we use speedbakes (speedbakes I mean flight and ground spoilers) (and especially ground spoilers), flaps Cl (and I think their Cm) should change too, because spoilers located right before flaps and when spoilers deployed we should have got airflow separation from the flaps and as result Cl and Cm of the flaps should be minimized too and as result overall Cl and Cm of the wing drops too.
In anyway with logic that I described (and with my script) all comes to work just fine.