Even if you didn't introduce this part, does the script import a custom module?
It raises the error even if you don't change anything
I think people sometimes get around this by updating files using suitetalk / restlet / IDE plugins.
In other words they can create the script record with source code that NetSuite doesn't complain about, and then update the source code using methods where NetSuite doesn't check for this "error". So it's possible that the code that triggers this "error" was introduced a while ago