Loss of flight promotes beetle diversification