Stability analysis of open-channel flows with secondary currents