Not the point me thinks. Firstly he was already out / defensless by then and secondly most people won't know if he really did what he is accused of, all you need is someone to yell "The foreigner tried to rape a local woman" and the mob will turn into judge and executioner in no time.
If such an accusation is actually true or not will not be of their concern, and afterwards it will be too late. Ever heard of anyone that was part of the mob who felt remorse and apologized when it turned out things weren't as they appeared?
If he did rape or attempt to rape the girl he deserves a good beating but since in most cases people can't know for sure (until his guilt is established by due process) I side with Alan.