xsim でコメント環境を使用できないのはなぜですか?

xsim でコメント環境を使用できないのはなぜですか?

私は講義ノートを書いていますが、その中に演習のヒントをいくつか追加したいと思っています。そのためには、 パッケージを使用しxsim、 の新しい環境を作成しますhint

また、場合によっては、いくつかの行をコメント化する関数を呼び出す必要もあります。

commentしかし、自分の環境内で環境を使用するとhint、エラー メッセージが表示されます。Argument of \xComment has an extra }. <inserted text> \par l.57 \end{hint} Runaway argument? デフォルトの環境を使用したときにも同じ問題が発生しましたexerciseが、使用可能なエラー メッセージは表示されませんでした。(したがって、問題は環境定義に起因しているとは思いません)。

MWE は次のとおりです。

\documentclass{article} 

    \usepackage{comment}
    \usepackage{xsim}
        \DeclareExerciseProperty{hint}
        
        \ExplSyntaxOn
            \bool_new:N \l_xsim_hint_bool
            
            \keys_define:nn {xsim}
            { hint/print .bool_set:N = \l_xsim_hint_bool }
            
            
            \NewDocumentEnvironment{hint}{+b}
            {%
                \tl_set:NV \ExerciseType \g_xsim_exercise_type_tl
                \tl_set:NV \ExerciseID \g_xsim_exercise_id_tl
                \SetExerciseProperty {hint} {#1}
                \bool_if:NT \l_xsim_hint_bool
                {
                    \par\medskip
                    \underline{\itshape Hint \nobreakspace \GetExerciseProperty{counter}}\,:\nobreakspace 
                    {#1}
                }
            }
            {}
        \ExplSyntaxOff
                
        %% description list for hints
        \newcommand\printhints{%
            \begin{description}
                \ForEachUsedExerciseByType{%
                    \GetExercisePropertyT{hint}
                    {\item[Hint ##3]####1}%
                }%
            \end{description}
        }
        
        %% Declare to print hint
        \xsimsetup{
            hint/print = true 
        }


\begin{document} 

    \begin{comment}
        no problem
    \end{comment}

    \begin{hint}
        Let us remark that $a+b=0$.
        
        \begin{comment}
            problem
        \end{comment}
    \end{hint}

    % \begin{exercise}
    %   Let us remark that $a+b=0$.
        
    %   \begin{comment}
    %       problem
    %   \end{comment}
    % \end{exercise}

\end{document}
%EoF

この問題をどうすれば解決できるでしょうか?

関連情報