Now we are discussing a more complex issue: does the person know? Knowing if an event, A, would cause event B, thus immoral would be deem event A immoral. Not knowing would deem event A okay since you are not guilty of the murders. This is a situation where you caused the event, but unintended/unintentional/accidental/right motives
For that, I would ask you give the same example, but change it up multiple times and I will be able to explain the morality of the actions.