Ya know what man, it is really strange you say this! I had a very similar experience a couple days ago. I was almost 4 weeks clean, and about a couple days ago I found a 40mg OP on the floor of my dudes moms pad (she is prescribed them for her pain) but this OP pill was old fersure. Normally an orange color to this pill, it was a little faded in color, but I took it anyway. Tried to snort it but was impatient with peeling off the wax film and crushing up the damn thing, so I chewed it and swallowed it. Mild mood lift at best. The next day I got a pretty bad headache.. I've heard when you put your body through the stress of repeated withdrawal, even being clean for 2 weeks or a month, if you go and do opiates it can trigger a stress response in your body/brain. Since it craves it, it's like you tease your brain, so it gets pissed off and tantalized and stressed, thus potentially bringing on the headache.
But who knows! Was it my old pill? Is that still possible after 2 and a half months clean? Is this even a solid theory? Aha, without studies and science to back my claim, this remains purely my speculation. I am as perplexed as well, but I'm gonna chalk it up to my brain being stressed and pissed at me for teasing it ha.