Control of coherent structures in reattaching laminar and turbulent shear layers