private void pastTense() {
    /*
     * Handle words less than 5 letters with a direct mapping This prevents
     * (fled -> fl).
     */
    if (word.length() <= 4) return;
    
    if (endsIn('i', 'e', 'd')) {
      word.setLength(j + 3);
      k--;
      if (lookup()) /* we almost always want to convert -ied to -y, but */
      return; /* this isn't true for short words (died->die) */
      k++; /* I don't know any long words that this applies to, */
      word.unsafeWrite('d'); /* but just in case... */
      setSuffix("y");
      lookup();
      return;
    }
    
    /* the vowelInStem() is necessary so we don't stem acronyms */
    if (endsIn('e', 'd') && vowelInStem()) {
      /* see if the root ends in `e' */
      word.setLength(j + 2);
      k = j + 1;
      
      DictEntry entry = wordInDict();
      if (entry != null) if (!entry.exception) /*
                                                * if it's in the dictionary and
                                                * not an exception
                                                */
      return;
      
      /* try removing the "ed" */
      word.setLength(j + 1);
      k = j;
      if (lookup()) return;
      
      /*
       * try removing a doubled consonant. if the root isn't found in the
       * dictionary, the default is to leave it doubled. This will correctly
       * capture `backfilled' -> `backfill' instead of `backfill' ->
       * `backfille', and seems correct most of the time
       */

      if (doubleC(k)) {
        word.setLength(k);
        k--;
        if (lookup()) return;
        word.unsafeWrite(word.charAt(k));
        k++;
        lookup();
        return;
      }
      
      /* if we have a `un-' prefix, then leave the word alone */
      /* (this will sometimes screw up with `under-', but we */
      /* will take care of that later) */

      if ((word.charAt(0) == 'u') && (word.charAt(1) == 'n')) {
        word.unsafeWrite('e');
        word.unsafeWrite('d');
        k = k + 2;
        // nolookup()
        return;
      }
      
      /*
       * it wasn't found by just removing the `d' or the `ed', so prefer to end
       * with an `e' (e.g., `microcoded' -> `microcode').
       */

      word.setLength(j + 1);
      word.unsafeWrite('e');
      k = j + 1;
      // nolookup() - we already tried the "e" ending
      return;
    }
  }
*
YCS: this was the one place where lookup was not followed by return.
So restructure it. if ((j>0)&&(lookup(word.toString())) &&
!((word.charAt(j) == 's') && (word.charAt(j-1) == 's'))) return;
***
linguistics/src/main/java/com/yahoo/language/simple/kstem/KStemmer.java