Yes, that is what is going on. So the trick is that sub_span is not a sub_span inside of span. We have previously created a new file map and appended that to the code map. sub_span is specified within that file_map and so lookup_byte_offset is valid. Then we take the byte pos within the extra file map and use that as an offset into the original span. The comment on retokenise_span covers most of this.