One quick thought: is this check too strict?  It seems possible for the start/end to have two different mode objects but mode1.name === mode2.name -- in which case we'd erroneously think the mode wasn't consistent across the selection.