Ok, I added this to the check:
&& $_POST['referral_page_for_broken_link']==$_SERVER['REQUEST_URI']
where the variable contained in $POST['referral_page_for_broken_link'] comes from a
<input type=\"hidden\" name=\"referral_page_for_broken_link\" value=\"$_SERVER[REQUEST_URI]\">
so it's a sort of double check and seems working fine. Is it ok in your opinion? 😉