Fix bug that prevented substring search to fail.

When the subtring occurred at the first position, the find function returns 0,
which gets implicitly converted to false. We did not check against
string::npos.