SCRIPT5007: Unable to get value of the property 'insertBeforeMe': object is null or undefined
range.js, line 163 character 5

It looks like this is the only way we have found so far how to trigger this JavaScript bug (quite an edge case), but in any case it would be nice to do something to protect against such errors, just to be safe.