Stabilization of the Rayleigh–Taylor instability by convection in smooth density gradient: Wentzel–Kramers–Brillouin analysis