chunked_strings: fix a bug where Index checks beyond string upper bound