Toggle to keep or remove original geometry not working

Hi folks!

Writing my first little program here (beginner alert), to help me with my daily work, and I’m hitting a snag.
I realize there are probably more elegant ways to get the same result, but it was fully functioning until not long ago.
The script basically mirrors, trims, and joins the selected geometry twice, over 2 axis, opening up a little Human UI screen, that closes upon clicking one of the buttons. The “true” value of the toggle would create a duplicate of the original geometry, and send it straight to “bake”, making it seem like the original geometry was untouched.
I made some changes, and I can’t get it back to work. It either executes the quad flip without leaving the original, or it duplicates the final mirrored geometry.
Is anyone able to troubleshoot for me? Aso, if there is a way of keeping the actual original geometry, rather than creating a copy, that would even be better.
Quad ui.gh (35.4 KB)