Ran across an attempt to discuss this elsewhere, and seems a good thing to address here...
Commonly known as the Felony Murder rule, this legal concept holds that if, whilst committing a felony, ANYONE gets dead (and in some cases any injury or harm occurs to ANY party), as the committing felon(s) it is ALL your fault.
This doctrine long predates the Castle Doctrine, and is the common rule, rather than the exception.
The presumption is that if you'd not been busy about your favorite felonious activity(ies), the death/injury/property damage resulting from your unlawful actions or from others responses to that offensive activity fall solely upon you - as but for your bad acts, the deaths/injuries/property damages would not have occurred.
This is typically a matter of state law, and varies widely from state to state and is inherited from English Common Law which goes back into the depths of history. YMMV.
IANAL. This is not legal advice. If you need legal advice, contact a lawyer.