Republicans' plan to redraw congressional districts to their advantage failed to work in the midterm elections.