I think you've completely missed my point.
With turrets set to target only, a red ship (ie hostile to you) attacking you, you must target him in order to do even a passive scan. The instant you target a red ship your turret will shoot him and because you haven't yet scanned him (fully) you get a wanted status.
If you run turrets and have not yet encountered this i'd be very surprised, whilst hunting in a RES eventually you will get a wing of red ships baying for your blood, yet you can't defend yourself even though they are pirates without getting a fine and therefore a 'wanted' status.
OK, sorry - yes I did originally misunderstand you. I have indeed been involved in similar situations - usually when taking out a legitimate target whose wingmen then turn upon me. I have found it best to hit 'K' (next hostile) and then - if they are not already showing 'Wanted' after firing upon me - very quickly deselect as a target to stop your turrets auto response until you can fully scan. Of course, there may be others out there with better solutions.
Take care.