nominesine's solution should work.
More generally this problem will occur with any vehicle (M2 is a vehicle according to OFP). As a general solution you could use crew as a means of getting at all loons that are in a vehicle. So something like
{not (alive _x)} forEach crew unit
would be useful for anytype of unit. If the unit is an M2 mg then it will check the gunner, if it is a tank it will check the commander, the gunner and the driver. If it is an APC it will also check any units that are in cargo, and if it is a simple solder it will just check him.