I hate this too. Well, strongly dislike. Maybe something like the below would be a good feature suggestion.

$replace(string,substring,newstring,N) where if N equals 1 if it the way it works now. If N equals 2 it will not modify any newstring additions.