Analysis of the onset of buoyancy-driven convection in a water layer formed by ice melting from below