Where prostitution is a crime, it isn't open season on prostitutes. They can break the law any number of times and still have a right to defend their lives, even if they put themselves in a dangerous situation. The law doesn't exclude them because they asked for trouble, or provoked the attacker.
DA to prostitute: "When did you first think you were going to be raped?"
Hooker: "When he didn't pay me."