There is a strange bug that has been in Mathematica for years, at least since version 5.1, and persisting through version 7.
Module[{f, L}, L = f[];
Do[L
As to version 8: I tried 100,000 random strings of various lengths and didn't find anything out of the ordinary.
chars = StringCases[CharacterRange["A", "z"], WordCharacter] //Flatten;
res = Table[
ToExpression[
StringReplace[
"First[AbsoluteTiming[Module[{weirdness,L},L=weirdness[];\
\[IndentingNewLine]Do[L=weirdness[L,i],{i,10^4}]]]]",
"weirdness" ->
StringJoin[
RandomChoice[chars, RandomInteger[{1, 20}]]]]], {100000}];