Update injection logic

In the case that a wrapper match is found in the existing content,
inject the new content in place of the match, rather than deleting the
match and then subsequently appending the new content at the end of the
existing content. This allows any manual updates made by users to the
placement of injected content to persist across environment updates.