The provisions of N.H. Rev. Stat. § 292:19 shall not apply where the instrument creating the particular trust specifically prohibits collective investment or where such an investment shall violate any specific court order made in any particular trust.