Transformation getting applied twice

Hello,
Thank you for building an amazing product.

The issue is that Octopus seems to run the release.config transform file twice. It succeeds in the first attempt to remove an attribute, but fails the second time because the attribute is already removed. I attached a screen shot of the Task Log.
The release transform has line

Also, it seems to also do that with other projects but actually goes through even though I see multiple transforms of the release file doing the same thing.

I have both “Configuration Variables” and “XML transforms” check boxes checked on the deploy step.

I figured out the problem.

I was missing this attribute in the xml configuration file
encoding=“utf-8”?

Not sure why that triggered the transform twice