The beneficiaries of a multimillion-dollar trust have sued an estate-planning attorney, his firm and an accounting firm, alleging professional malpractice related to a tax plan that led to litigation with the Internal Revenue Service.

But in an unusual twist, the beneficiaries also sued the firm and lawyers to whom their estate-planning attorney referred them for representation in that litigation before the U.S. Tax Court against the IRS. That Tax Court litigation allegedly cost the plaintiffs more than $1 million in legal fees.