fix incorrect interpretation of 'eof in new find-string implementation