calypso/irq: Fix array bounds checking