Bug report to Mathematica

March 3, 2005: report sent to Mathematica. 
April 28, 2005: "... filed a bug report for the behavior."

On Mathematica 5.0, Linux

I have been testing the function

UnsortedUnion[x_] := 
      Module[{f}, f[y_] := (f[y] = Sequence[]; y); f /@ x]

suggested by Mathematica in the Help. I have found the following strange behaviour: if I use the function on a list of 99 or less elements then the Temporary variable f$nn is correctly removed:

list = Table[Random[Integer, {0, 9}], {99}];

UnsortedUnion[list]

?f$*

as I expected. However, if the list contains 100 or more elements then:

list = Table[Random[Integer, {0, 9}], {100}];

UnsortedUnion[list]

?f$*

the Temporary variable f$26 is not removed.

?f$26

On Mathematica 5.2, Linux

I have been testing the function

UnsortedUnion[x_] := 
      Module[{f}, f[y_] := (f[y] = Sequence[]; y); f /@ x]

suggested by Mathematica in the Help. I have found the following strange behaviour: if I use the function on a list of 99 or less elements then the Temporary variable f$nn is correctly removed:

list = Table[Random[Integer, {0, 9}], {99}];

UnsortedUnion[list]

?f$*

as I expected. However, if the list contains 100 or more elements then:

list = Table[Random[Integer, {0, 9}], {100}];

UnsortedUnion[list]

?f$*

the Temporary variable f$24 is not removed.

?f$24