It seems that a recent version of Moodle is now using <object> tags to embed SCORM courses instead of <iframe> tags.
Unfortunately, a bug in IE9 (maybe earlier versions too) causes the onunload/onbeforeunload events to not fire when the <object>'s owner document unloads.
Effectively, this means that if an embedded course is terminated by someone clicking a button in the Moodle UI (outside the course), the course will not be able to capture onbeforeunload/onunload and so will not be able to wrap things up and call Terminate() on the SCORM API.