Instability of the buoyant parallel flow in a heterogeneous medium with an impressed horizontal heat flux