Police avert trouble over burning flag