The resolution of questions of fact or issues of law by trial or hearing which can be made without the assistance or participation of the defendant is not prohibited by the existence of any pending proceeding to determine whether the defendant is or remains mentally incompetent or gravely disabled pursuant to the provisions of either this code or the Welfare and Institutions Code.