Tweak sem_hist computation.