Yes, the judge crossed the line. There is no possible way that the girl's rape was her own fault. She couldn't have kept her legs together if she was too scared to move. No one can be blamed other than the assailant. The judge later did apologize for saying those remarks.
Sometimes people make very bad decisions. And there are cases where "rape" is the term a person uses after they regret having consensual sex. In a case such as that, it is not someone getting raped, it is merely foolishness. When a person in forced to undergo sexual acts without their permission, it is completely the fault of the perpetrator.
Rape victims are never at fault for a rape. Rapists rape because of power or because of wanting something they can not have. It is not up to the victim to try to prevent the rape, it is up to the rapist to not rape. The entire premise is silly and ignores consent.
Yes, the Canadian judge who told a rape victim that she was responsible for her own rape was clearly in the wrong. Victim-blaming does absolutely nothing to curb violent crimes such as rape. Instead, the focus should be on the perpetrator and not on the victim. The perpetrator is the one who made the choice to rape the victim.