External interrupt fires early?

westfw:
From a HW point of view, I can imagine circuitry that detects falling and rising edges, as well as levels, that would be active all the time...

But the interrupt flag can be cleared when the interrupt is enabled. I tested either a timer related interrupt or the pin change interrupts for that behaviour (can't remember which or why) and the flag is indeed cleared when the interrupt is enabled.

Out of paranoia, I have a tendency to always clear the flag.

I'm starting to suspect the behaviour is by-design. Working the way it does eliminates a race condition in applications that have to be able to enable/disable external interrupts (an RTOS might need to do that).