That is correct. That is what the interrupt flags are for, to allow the interrupt routine determine which interrupt occured.