I can think of two fairly easy ways to accomplish this without changing anyone's groups:
1) You can either create an actor attribute for all your actors and have your Ally/Enemy actors check this attribute before firing. As in: (I've called this attribute [alignment]in my example)
If {Get [alignment] in behavior [actor events ####] for [neutral structure]} not= [alignment]
Firing code goes here
In the above code, the firing is only executed if the firing actor's alignment is not equal to the other actor's alignment.
2) Or, when a neutral structure is captured, you could kill it and spawn a new actor that is in the correct group, based on the group of the actor that killed him. You would just need to keep track of which actor group fired each missile to do this.