Well if it's not that, then it's as the others said. Of course, you have to look at the whole process though, if there was any lay-out fluid or anything inside a hole or somewhere, it could have caused it, something could have been on the foil. Even just residual air in the packet.
I usually fold my packet edges 3 times, and press them, but even still, it's pretty easy to see where they'd leak at the corners where the sides and top meet.
I'm not aware of any HT method that is 100% clean, and fool-proof. Even salt pots, which are about the cleanest option, require minimal cleanup afterward. Maybe you'll figure it out, all I'm saying is that, even when I've had stuff, surface ground, cleaned extensively, and nice neat well folded seams on my packets, I've had discoloration. I attribute it to either micro contaminants or residual air, problem is, if you put something in to burn out any residual air, tends to discolor more.