This is a bug we inherited from the reference implementation. The helper
function
string-parse-start+end is documented to return three values: "rest start
end",
but within make-kmp-restart-vector (which appears about 5 levels down in
your
stack trace) its result is bound to two variables (start end). The same
error
exists in string-kmp-partial-search.
I believe that in both of those places the call to
string-parse-start+end should
be replaced by a call to string-parse-final-start+end, which strips off
the first
unwanted rest value.