Wow, that's a frustrating bug, but good spot working it out.
As you say, sounds like interrupts are disabled while the open/close signal is being handled. Makes you wonder how it's handled in other models? Something physical like the lock you mention. Or maybe something in logic - like a series of flip flops? - to store and forward sensor actuations.
Hardware is fascinating but not when it goes wrong :-(