The Republicans have only themselves to blame. They let the anarchists of the Tea Party and the Libertarian movement into their party, thinking they could control them. They encouraged a massive flow of secret, dark money thinking it would buy them votes, while in fact it has destroyed any kind of party discipline.
Clearly a case of lying down with dogs...