Remove unused loop variable.
$replace does not need to be set that early
use only one condition in words
Merge pull request #5727 from franzliedke/patch-3

Remove unused loop variable.