The problem is most likely not the rewriter in this case but the HTML parser used under the hood that parses the HTML, and that one is much harder to have ignore something. You can drop a support case to Developer Support to get a bug report in.
One way to get around this, is to serve the script from a handler and with a content type that the HTML parser module doesn't pick up.
Per, I'll do that.
Johan. Good point, unfortunately in this case the script is an embeded resource from a third party vendor.
Thank you both!
And the same thing is happening.