Mo. Rev. Stat. § 456.4-413
1. Except as otherwise provided in subsection 2 of this section, if a particular charitable purpose becomes unlawful, impracticable, impossible to achieve, or wasteful:
2. A provision in the terms of a charitable trust that would result in distribution of the trust property to a noncharitable beneficiary prevails over the power of the court under subsection 1 of this section to apply cy pres to modify or terminate the trust only if, when the provision takes effect:
(L. 2004 H.B. 1511)
Effective 1-01-05, see § 456.11-1104