That did the trick!
I varied the technique a bit by peeling the stickiness right off of the self-adhesive foam I had. It's basically a piece of double-sided tape that peels off pretty cleanly. I wedged a strip in between the dash and windshield at the problem area. I didn't go all the way across- I just went from the A-pillar joint to the heating duct. The foam I have is black, and stuffs in so far you can hardly see it.
I also got around to fixing the glovebox rattle with the same foam stuff.
But it worked. This morning, I had my first flick and rattle free drive to work in two months.
There's still the HVAC fan
Hissssss, and the squeaking cargo floor, but these weren't driving me quite as insane.
Thank you so much! I'm starting to love my X-Trail again.
