Frictional hysteresis and particle deposition in granular free-surface flows