Unexpected results happen when the last instance of a search term has been found and replaced in Advmemo. To reproduce: Connect an Advmemo, advmemofindreplacedialog and advreplacedialog to each other. Enter the following:
dog
Execute the find/replace dialog. In the Find field enter: dog
In the Replace field enter: cat
Click replace twice. As expected, the memo now contains: dogcat
Click replace several more times and you will see something like: dogcatcatcat
The problem appears to be that the search wraps to the beginning of the file such that it is repeatedly finding the single instance of dog and replacing dog with dogcat.