I'm giving up finding a more generalized solution. The issue is that we need the correct selection state right up to the point where we modify Lines, in order to capture precise undo state.
Hopefully there aren't any other keychords that should clear the selection.
VA2ZYFFF7X5NAQ54V44F6UPPNNK2AY4CZIRJISGNYAOVEQASR5JQC