add: if (!cursor) return null; } 
context: function xformsFindRepeatDelimiter(repeatId, index) {    // Find id of repeat begin for the current repeatId    var parentRepeatIndexes = "";    {        var currentId = repeatId;        while (true) {            var parent = document.xformsRepeatTreeChildToParent[currentId];            if (parent == null) break;            parentRepeatIndexes = "-" + document.xformsRepeatIndexes[parent] + parentRepeatIndexes;            currentId = parent;        }    }    var beginElement = document.getElementById("repeat-begin-" + repeatId + parentRepeatIndexes);    var cursor = beginElement;    var cursorPosition = 0;    while (true) {        while (cursor.nodeType != ELEMENT_TYPE || cursor.className != "xforms-repeat-delimiter")            cursor = cursor.nextSibling;        cursorPosition++;        if (cursorPosition == index) break;        cursor = cursor.nextSibling;    }    return cursor;}
meta: 7519	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/7519/4cb45056616c6c7564f30cb54ee08de5498d5add/xforms.js/buggy/src/examples/web/config/theme/javascript/xforms.js