Fix tests (broken by UTF-8 support): adjust scanner's pointers when scanning inverted ranges.