(a) Notwithstanding the breadth of discretion granted to a trustee in the terms of the trust, including the use of such terms as "absolute," "sole," or "uncontrolled," the trustee shall exercise a discretionary power in good faith and in accordance with the terms and purposes of the trust and the interests of the beneficiaries.
(b) Subject to subsection (d), and unless the terms of the trust expressly indicate that a rule in this subsection does not apply:
(1) a person other than a settlor who is a beneficiary and trustee of a trust that confers on the trustee a power to make discretionary distributions to or for the trustee's personal benefit may exercise the power only in accordance with an ascertainable standard; and
(2) a trustee may not exercise a power to make discretionary distributions to satisfy a legal obligation of support that the trustee personally owes another person.
(c) A power whose exercise is limited or prohibited by subsection (b) may be exercised by a majority of the remaining trustees whose exercise of the power is not so limited or prohibited. If the power of all trustees is so limited or prohibited, then the court may appoint a special fiduciary with authority to exercise the power.
(d) Subsection (b) does not apply to:
(1) a power held by the settlor's spouse who is the trustee of a trust for which a marital deduction, as defined in Section 2056(b)(5) or 2523(e) of the Internal Revenue Code of 1986, as in effect on January 1, 2007, or as later amended, was previously allowed;
(2) any trust during any period that the trust may be revoked or amended by its settlor; or
(3) a trust if contributions to the trust qualify for the annual exclusion under Section 2503(c) of the Internal Revenue Code of 1986, as in effect on January 1, 2007, or as later amended.