Origin of the ‘S-shaped’ temperature dependence of luminescent peaks from semiconductors