My intention would be to rescue A, B and C. The death of G is an unintended side-effect of rescuing A, B and C. The rescue of D, E and F by Sam is welcome but not intended (since if it were intended, then the death of G would have to be intended as a means thereto, and it is wrong to intend G's death).