Thermally activated intersubband scattering and oscillating magnetoresistance in quantum wells