We shouldn't really be using so much of the range API, apart from getting the selection and converting to boundaries, then converting back from boundaries to a range and adding it to the selection.