To just reply to your question, not the particular case: Committing a crime can hurt your defense, but doesn't always make it impossible. It all depends on which crime you have committed. If you shoot a gun at me but miss me, and I shoot back (in justified self defense) and injure you, then you can't kill me and successfully claim self defence. Even if you are in reasonable fear of your life. Because the whole situation was created by your crime.
On the other hand, if you steal a bar of chocolate in a shop, the shop owner goes mad and tries shooting you, injures you, and looks like he is going to shoot again, then it would be very likely that you can successfully claim self defence if you shoot them first. Stealing a bar of chocolate is a crime, but not one that a shop owner can use as a valid excuse to kill you.
On the third hand, if you were caught raping a woman, that would be a crime that would likely cause a strong reaction, and it would be reasonable to expect you getting beaten up by people finding out (not that it would be right, but you'd have to expect it). In this situation, you can only claim self defense if you are in reasonable fear of your life or of "great bodily harm". The fear must be reasonable - even rapists are usually not killed by a mob. And "great bodily harm" is a legal term for the worst kind of bodily harm, getting beaten up would not be "great bodily harm". So for a succesful claim of self defense, more would have to happen.