We used resonant inelastic x-ray scattering (RIXS) with and without analysis of the scattered photon polarization, to study dispersive spin excitations in the high temperature superconductor YBa2Cu3O6+x over a wide range of doping levels (0.1 < x < 1). The excitation profiles were carefully monitored as the incident photon energy was detuned from the resonant condition, and the spin excitation energy was found to be independent of detuning for all x. These findings demonstrate that the largest fraction of the spin-flip RIXS profiles in doped cuprates arises from magnetic collective modes, rather than from incoherent particle-hole excitations as recently suggested theoretically [Benjamin et al. Phys. Rev. Lett. 112, 247002(2014)]. Implications for the theoretical description of the electron system in the cuprates are discussed.