Fixed major Z-algorithm bug which caused it to fail on strings of unequal length.