Notwithstanding any other provision of this subchapter, if in any judicial proceeding involving a trust matter the court determines that the representation provided by section 7723 (relating to representatives and persons represented) is or might be inadequate, the court may appoint a guardian ad litem or trustee ad litem to represent the inadequately represented person, class of persons or both.