Fix linked groups when using multiple codes.