Code in wc3 is always ordered. Those two damage instances are treated as separate events.
Let's say you damage a unit. It'll pause the current process, skip over to the damage event, complete the damage triggers, and then return to the original thread. So it'll work fine as long as you set the boolean back to false. For example, let's say you have this code:
JASS:
function SomeDamage takes nothing returns nothing
......
call BJDebugMsg("Start")
call UnitDamageTarget(u,gg_unit_Hamg_0111,.........)
call BJDebugMsg("In Between")
call UnitDamageTarget(u,gg_unit_Hamg_0111,.........)
call BJDebugMsg("Finished")
.....
endfunction
......
function onDamage takes nothing returns nothing
call BJDebugMsg("Damage")
endfunction
function test takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterUnitEvent( t, gg_unit_Hamg_0111, EVENT_UNIT_DAMAGED )
call TriggerAddCondition(t, function onDamage)
endfunction
What do you think will be displayed? If you run it in Warcraft 3, it'll display:
Start
Damage
In Between
Damage
Finish
Hopefully that shows why the code will work just fine, even with two damage instances at the "same" time.