llGetPrimitiveParams([PRIMITIVE_FLEXIBLE]) doesn't seem to reflect changes made in the edit window, at least not reliably.
When you set PRIMITIVE_FLEXIBLE to FALSE, it loses all the settings.
This means that there's no way to turn a prim non-flexible, then later turn it flexible, and restore the params to the original, either by just keeping them around or by reading and writing them.
Combine that with the way that the script and edit params are so different, it makes it hard to play with the params and then use hem in a script.
Also, just right-clicking on an object that's had flexibility set in a script seems to change its flexibility or stiffness.