In August, the dispute was resolved. The outcome was surprisingly generous to the owners of those sales-tax bonds. They were offered new bonds that would be valued at either 93 percent or 56 percent of what the old ones originally were worth, depending on the terms of the old bonds. (The amounts that investors in many other bonds will receive haven’t yet been settled.)

That was a boon for many investors, given that the bonds were trading for as little as 9 percent of their face value as recently as December.

McKinsey owns some of those bonds.

The investments were made through a subsidiary of the consulting firm, MIO Partners. MIO manages roughly $25 billion for McKinsey’s thousands of employees, alumni and retirees. MIO, in turn, runs three hedge funds — Compass CSS High Yield, Compass ESMA and Compass TSMA — that have reported owning the sales-tax bonds and are seeking $20 million in repayments, according to regulatory filings and bankruptcy claims in San Juan’s federal court.

Even if all of those $20 million in bonds were redeemed at the lower amount of 56 percent, that would be an $11.2 million payment for McKinsey. The actual amount will probably be bigger. Filings by Compass CSS indicate that it stood to recoup about $10 million of its $16.3 million claim. Compass CSS originally paid $4.5 million for its bonds, the filings show, so the McKinsey-owned hedge fund could more than double its investment.

Mr. Carella, the McKinsey spokesman, said its internal investments were managed by an independent unit, “separate from McKinsey’s consulting operations.”

Another McKinsey investment in Puerto Rico appears to be through a company called Whitebox Advisors, which as of 2016 managed about $100 million for McKinsey’s retirement plans, according to regulatory filings.