This PR lets implicit instance names avoid name clashes with private declarations. This fixes #10329.