Inter-party voting and intra-party cohesion