fix #152 renderLatex errors if selected to edge

after mutating this.ends, writeLatex disowns the selection, but the ends
of the selection are now malformed