Consider the input "baab". This is actually given in the discussion of g098.d, which gets this wrong.