Prevent word duplication when appending to an object

Fix [CC#1979](http://issue.cc/r3/1979)
Optimize the code to not use search
Tested in Linux (0.4.4), no regressions, 1 progression