You could use a conditional to compute the extracted column (this is evaluated once per group):
extract if count value first value else () end where 1<count index by value from str
Or you could use the "gindex" column to make the filter retain at most one element per group:
extract where (!gindex)&1<count index by value from str
How's that?