Spin-flip probability in the inelastic scattering of 15-40 MeV protons on light nuclei