Fixes text_id_range to include the node itself, if it corresponds