Interaction between reconnection and Kelvin–Helmholtz at the high-latitude magnetopause