Looks like an actual error in the script that the old script engine happened to silently ignore for some reason.

Please try the attached updated version - this new version should work in either v2 or v3 now.

In addition to the UI for v3 being on a new system, the script processing also is using a new system as well and there may be a few kinks related to that, like in this case with a slight difference in error handling making a difference to how the script was executed. It should only require minor tweaks to fix up these kinds of issues as well.