Handle differences between RangePositions and OffsetPositions.
Merge pull request #514 from marcsaegesser/PositionFix

Handle differences between RangePositions and OffsetPositions.
Semantic highlighting tests