This is my theory on the matter:
If it was a problem with the code itself, it would happen every time.
Since it doesn't, I suspect it's something else.
So to test this theory, can we confirm that everyone in here who has experienced the problem has experienced it on a template with ads? If so, that means I've found the culprit and can work on a solution. If not, back to the drawing board.
I LOVE BLUD BLOOD! - Rob Liefeld