The indexOf operation on the Buffers library is being applied against the _buf after the current chunk has been applied but before the equivalent number of bytes of old chunks can be removed from it. The problem is doesn't consider that pattern can be larger than a single or multiple chunks.
I discovered this problem while tracing difficulties I'm having with the unzip2 library which depends on match-stream.