Do you understand that the objective morality of an act is contingent upon the intention when you form your will to perform it?

So, if you demolish a condemned building unaware that a homeless person is inside it, you are not guilty of murder?

Of course not.

Double effect, intrinsic immorality, and more are  mysteries to the situation ethics aficionado.