Use char offset when comparing match locations

Previously the byte offset of the start location was used when comparing
against the location of the match but the match locations always return
character offsets. This could cause a non-best match to be chosen if its
char offset was equal to the byte offset of the start location.

This would only occur when the string being searched contained multi-byte
characters.