The stability of a granular bed sheared by a liquid flow is investigated using an erosion-deposition model for the moving grains. Extending to arbitrary wave number a previous long wave analysis [F. Charru and E. J. Hinch, J. Fluid Mech. 550, 111 (2006)], this study shows that short waves are stabilized by a crest-erosion mechanism that is absent when the local particle flux is assumed to be in equilibrium with the local bed shear stress. The cutoff length associated with this mechanism scales on a deposition length of the particles. This characteristic length is similar, although of a different physical nature, to the inertial length involved in relaxation models of dune dynamics under the wind. Two stabilizing mechanisms cooperate for the most amplified wave number: the new crest-erosion mechanism and the gravity force parallel to the local slope of the inclined bed. The predictions of this model are compared to observations, showing better agreement than previous stability analyses, which strongly underpredict the observed lengths. (c) 2006 American Institute of Physics.