I put the delete in. Once the error had gone I commented that line out to see if it was necessary and the error did not return.
Sorry, since your example didn't include the delete, I interpreted that to mean that you hadn't used it. (I've only got what you show me to go on, so that's not an unreasonable interpretation.)
My first experiment didn't have the delete but did change the PATH, and it wasn't sufficient to remove the taint message; my second experiment added the delete and the taint message went away; in a later experiment, I accidentally forgot the delete, and the taint message came back. So I don't know how the taint message went away for you. I would personally be worried that it will come back unexpectedly; since it doesn't hurt to leave it in, that would be my recommendation.