Fix bug in check for overlapping collapsed ranges
Fix bug in check for overlapping collapsed ranges

Closes #3998

SidPresse/CodeMirror,TDaglis/CodeMirror,codio/CodeMirror,ficristo/CodeMirror,nightwing/CodeMirror,rrandom/CodeMirror,vincentwoo/CodeMirror,alur/CodeMirror,pabloferz/CodeMirror,hackmdio/CodeMirror,grzegorzmazur/CodeMirror,dperetti/CodeMirror,hackmdio/CodeMirror,MarcelGerber/CodeMirror,Dominator008/CodeMirror,INTELOGIE/CodeMirror,crazy4chrissi/CodeMirror,notepadqq/CodeMirror,ficristo/CodeMirror,grzegorzmazur/CodeMirror,xeronith/CodeMirror,codio/CodeMirror,schanzer/CodeMirror,mizchi/CodeMirror,mizchi/CodeMirror,Dominator008/CodeMirror,schanzer/CodeMirror,INTELOGIE/CodeMirror,jkaplon/CodeMirror,hackmdio/CodeMirror,alur/CodeMirror,jkaplon/CodeMirror,namin/CodeMirror,mtaran-google/CodeMirror,SidPresse/CodeMirror,Dominator008/CodeMirror,bfrohs/CodeMirror,pabloferz/CodeMirror,ficristo/CodeMirror,kerabromsmu/CodeMirror,dperetti/CodeMirror,INTELOGIE/CodeMirror,bfrohs/CodeMirror,codio/CodeMirror,jkaplon/CodeMirror,nightwing/CodeMirror,mtaran-google/CodeMirror,MarcelGerber/CodeMirror,jayaprabhakar/CodeMirror,wingify/CodeMirror,adobe/CodeMirror2,xeronith/CodeMirror,namin/CodeMirror,crazy4chrissi/CodeMirror,notepadqq/CodeMirror,ejgallego/CodeMirror,sourcelair/CodeMirror,bfrohs/CodeMirror,alur/CodeMirror,grzegorzmazur/CodeMirror,rrandom/CodeMirror,kerabromsmu/CodeMirror,Jisuanke/CodeMirror,Jisuanke/CodeMirror,sourcelair/CodeMirror,TDaglis/CodeMirror,jayaprabhakar/CodeMirror,jayaprabhakar/CodeMirror,wingify/CodeMirror,thomasjm/CodeMirror,adobe/CodeMirror2,vincentwoo/CodeMirror,vincentwoo/CodeMirror,mtaran-google/CodeMirror,pabloferz/CodeMirror,namin/CodeMirror,adobe/CodeMirror2,ejgallego/CodeMirror,dperetti/CodeMirror,notepadqq/CodeMirror,kerabromsmu/CodeMirror,rrandom/CodeMirror,mizchi/CodeMirror,schanzer/CodeMirror,wingify/CodeMirror,crazy4chrissi/CodeMirror,SidPresse/CodeMirror,thomasjm/CodeMirror,TDaglis/CodeMirror,ejgallego/CodeMirror,sourcelair/CodeMirror,xeronith/CodeMirror,thomasjm/CodeMirror,nightwing/CodeMirror,MarcelGerber/CodeMirror,Jisuanke/CodeMirror