Fix search bug.

If mid-string match was found, the last match would be returned.