EU leaders want to avoid a legal blowup with the Hungarian prime minister that could feed into his reelection campaign.