Prevent word duplication when appending to an object
Fix CC#1979
Optimize the code to not use search