(a) By written consent of the settlor and all named beneficiaries of a trust or any part thereof, regardless of any spendthrift or similar protective provisions, the trust or part thereof may be revoked, modified, or terminated upon a finding by the court having jurisdiction over the trust, or otherwise being of competent jurisdiction, that the trust's purposes, as expressed in or implied by the circumstances surrounding the trust, as a result of circumstances not foreseen to the settlor are not effectively being fulfilled or are frustrated.
(b)
(1) For purposes of this section, consent to the revocation, modification, or termination may be given by the court on behalf of unnamed, legally incapacitated, unascertained, or unborn beneficiaries after a hearing in which the interests of such beneficiaries are represented by a guardian ad litem.
(2) A guardian ad litem for any such beneficiaries may rely on general family benefit accruing to the living named beneficiaries and their families as a basis for approving, or not objecting to, any such revocation, modification, or termination and, in so doing, shall be immune from liability to future claims of any unnamed, legally incapacitated, unascertained, or unborn beneficiaries.
(3) In circumstances in which objection is made by a guardian ad litem for beneficiaries who are not, by name or category, mentioned in a trust that is sought to be terminated, modified, or revoked, upon a finding that there is general family benefit to the living named beneficiaries and their families, the court shall allow the termination, modification, or revocation sought.
(c)
(1) For purposes of this section, consent may be given on behalf of the estate of a deceased settlor by the court on a finding that there is general family benefit to the living named beneficiaries and their families.
(2) A personal representative of a settlor's estate may rely on general family benefit accruing to the living named beneficiaries and their families as a basis for approving, or not objecting to, any such revocation, modification, or termination and, in so doing, shall be immune from liability to future claims of any unnamed, legally incapacitated, unascertained, or unborn beneficiaries.