Question: What happens is an incoming interrupt tries to set the IIF register flag at the same time as the CPU tries to write into the IIF register
Answer: The incoming interrupt has higher priority and the interrupt will be taken first.