There is no law in America that I know of protecting police from the consequences of their illegal actions. Just like any other home invader, you have the right to put them down if they enter your home illegally. You can also use deadly force to stop them if they are raping someone, molesting a child, beating their wife... These are all crimes police have committed and they do so far more often than the average citizen.
The typical law enforcement officer is mentally unstable with extreme violence tendencies and an attitude that they are above the law. If they act on those tendencies they need to be treated just like anyone else threatening your safety.
The only reason Indiana passed the law is because their state supreme court chose not to follow the law but instead just make shit up to suit their personal political views. Very similar to the way SCOTUS "ruled" on Florida's voter fraud and also the Citizen's United "ruling". Supreme court members are elevated to an untouchable position for life with the only recourse being to pass new laws in defense of their unfaithful and un-Constitutional decisions.