fix bug in locate-chars, doesn't return location for 1st pair in document