I agree, what you describe is what terrorists think. Obviously, at some point in their life they persuade themselves that their political goals justify the intentional killing of innocent civilians. They go at great lengths with these justifications precisely because they are so obviously flawed. Attempts to justify their actions involve a mix of denying the Doctrine of Double Effects, speaking of necessary sacrifices, and of portraying innocent victims as guilty collaborators.