This.AJAX.onreadystatechange definition, iOS 6 issue

I have been using the RemObjectsSDK.js that comes with 7.0.65.1067 Delphi. It has worked well on most browsers, but an intermittent issue occurs on iOS6 devices. Using the Safari developer menu link up, I have identified the location of the error, which is “‘null’ is not an object (evaluating that.AJAX.readystate)”.
Line 1421 of RemObjectsSDK.js has this code:

         this.AJAX.onreadystatechange = function onreadystatechange() {
             if (that.AJAX.readyState == 4) {
                 that.updating = false;

The problem is the that.AJAX can end up with null in some situation I don’t fully understand. My solution for now has been to make it:
this.AJAX.onreadystatechange = function onreadystatechange() {
if (that.AJAX != null) { // MJ
if (that.AJAX.readyState == 4) {
that.updating = false;

I would though appreciate someone who properly understands this code to look at it and work out how this might be happening. It was not consistent but it would happen within a few minutes with a couple of calls a second happening.

Unfortunately, we couldn’t reproduce this. Could you try to add some logging to this function?

if (that.AJAX) console.log(that.AJAX.readyState) else console.log("AJAX is null");