I agree with Yukinohki, relabel the mission to a more appropriate name and count both.
I have what is not necessarily a bug but is a bad game interaction IMHO.
When gangs are guarding it seems that the first gang set to guard will always be the one confronted by a rival. So one of two things happens, if your first gang was guarding and moves to healing they get in a cycle of recruit, fight, recruit, fight, etc....
Or... If you are attacked by two or three rivals on the same turn even with a maxed out gang and weapon, you lose that gang.
To me it does not seem realistic that either of these situations would occur. I suppose it is possible that three rivals would all attack the same location at once, but this should be rare (since installing version 15 I have had this happen to 5 maxed out gangs in less than one year, I have not gone to 16 yet, and they were not maxed on strength but all other stats were at 100 or very close to).
The more gangs you have guarding the less chance this should happen, and I usually have 5 gangs on guard duty.