Removed an unnecessary loop - it kills performance on large texts.
Merge pull request #11600 from jasiek/master

Removed an unnecessary loop - it kills performance on large texts.