Police bungle prosecution of rape case