No, not at all!
I feel like I always come off as a jerk when I'm really just a cynical smarta$$ who thinks he knows everything. I didn't have my coffee this morning...
It's just risky. If you have no other choice, just be sure to use a large box (at least 2 to 3 times the size of a single headlight) and a temperature probe to constantly monitor the temperature inside the box. Keep it between 200°F and 250°F and be sure that the heat gun is not blowing directly on the headlight.
What I was getting at is do not try to use a heat gun directly on the headlight. If you use a box with a gun attached to it like an oven, then it's probably going to work ok.