Fixed out-of-bounds access in findVector().
Added a test for out-of-bounds access in findVector().
Added a check for patternSize and removed a useless check.
Merge pull request #390 from TsudaKageyu/vector-bounds

Fixed out-of-bounds access in findVector().