The engine would very definitely have been changed because foam was sprayed through it. I recall when the Delta 777 was given a fire cannon salute with foam instead of water - a bit of it got in the engine, reacted with the engine material and caused major damage, if not a write off.
I disagree with the person who says "that if the fire crew thinks it needs to act they are authorized to do so whatever the protestations of the crew"; I think if the Captain says "do not spray my aircraft" and they do so anyway, then they must have an absolutely irrefutable reason for doing so, and they are in so doing, taking liability upon themselves.