I would agree it's a big coincidence that a rattle occurs just after exhaust work (and if it's valves making the noise you have a failure as they have no moving parts, they are the part that moves inside the head)