This annoying error is surprisingly easy to fix. Most of the time, it's caused by using the Script tag "incorrectly" (Which seems correct in all other situations, but does not work in this case.):
<script type="text/ecmascript" src="SomeFile.js"/>
This occasionally confuses things due to a technicality with the DOM rules.
The fix is to change it to use a closing script tag rather than the "/>" shortcut:
The fix is simple, just change your declaration to use an End-Script tag instead of the "/>" shortcut:
The fix is surprisingly easy, even if it doesn't fully make sense. (Apparently it has something to do with the more esoteric rules of the Document Object Model)
<script type="text/ecmascript" src="SomeFile.js">< /script>
Usually at this point, the error goes away. :)