Mechanistic studies on the diastereoselective halohydroxylation of γ-δ unsaturated carboxamides