Section 17. (a) Upon termination of a custodial trust, the custodial trustee shall transfer the unexpended custodial trust property:
(1) to the beneficiary, if not incapacitated or deceased;
(2) to the conservator or other recipient designated by the court for an incapacitated beneficiary; or
(3) upon the beneficiary’s death, in the following order:
(i) as last directed in a writing signed by the deceased beneficiary while not incapacitated and received by the custodial trustee during the life of the deceased beneficiary;
(ii) to the survivor of multiple beneficiaries if survivorship is provided for pursuant to section six;
(iii) as designated in the instrument creating the custodial trust; or
(iv) to the estate of the deceased beneficiary.
(b) If, when the custodial trust would otherwise terminate, the distributee is incapacitated, the custodial trust shall continue for the use and benefit of the distributee as beneficiary until the incapacity is removed or the custodial trust is otherwise terminated.
(c) Death of a beneficiary shall not terminate the power of the custodial trustee to discharge obligations of the custodial trustee or beneficiary incurred before the termination of the custodial trust.