The wrong flag (irq instead of firq) was cleared if the CPU was in SYNC mode and the interrupt was masked.
14a2690