What causes an ice cream headache?

It is a warning that one is approaching dangerous territory. Stop drinking or eating that right now. Like the gag reflex. It might be a mis-understanding or a false signal being mis-interpretted like sciatica, but I doubt it. At what temperature or length of exposure would actual damage occur? and when should your body start to warn you? Would you really continue to eat because intellectually you know it might be a false or bad signal being misunderstood by your common sense? That would be over-intellectualizing.

Your situation sounds like the system is mis-behaving in a different way, but it doesn’t represent the ‘as designed’ function of the machine. I am sorry you are experiencing pain. That is major suckage.