fixed issue with replace-vars only replacing the first instance of the pattern in a given textNode.