Structural basis for dimerization quality control