Thanks radzmar!
JSLint didn't find anything but it set me on the path towards looking for syntax errors. I deleted code in the script object line by line until I narrowed it down.
Turns out it is Regular Expression literals, in particular trying to escape (\) the metacharacters ($.{}[] etc).
For example, var reg = /\}/; should technically match any right-handed curly brace, which in fact it does! The function that it is in works perfectly but every function written below it is not recognized by the XFA processor. Just out of curiousity I tried reg = /\{\}/; which matches {} and all the functions below now are recognized. It seams as though, even though using the escape character is allowed in core JavaScript, the processor sees it as a syntax error because it's not terminated.
Anyways, the easy fix is of course using the RegExp constructor var reg = new RegExp("\\}"); but I'll miss the confidence I had using Regular Expression literals.
Thanks again for the nudge in the right direction.
Kyle