Fix reference values when swapping range pointers.

When you drag one range pointer past the other, they 'swap' and you continue dragging the other one. However, if you did this rapidly the range would wander. This locks the values so that this wandering doesn't happen.