Fix for char offset range component generation edge case.

This fixes generating a range component between a text node in an element node and a text node with the same parent as the element node.