[PR c++/84375] Fix ICE after bad friend