In a command with an optional argument, if I put a string beginning with TeX quotes (e.g., ``quote'') in the optional argument, something goes wrong. See the bottom entry in the example below.
The example is a bit more than minimal because I wanted to show clearly both the input and the output in the PDF.
\documentclass{article}
\usepackage{csquotes}
\newcommand{\optional}[2][\relax]{%
\ifx#1\relax
[\emph{no first arg}]
\else
[\emph{arg\#1:} #1]
\fi
\{\emph{arg\#2:} #2\}%
}
\begin{document}
\begin{tabular}{l}
%
\verb|\optional[first]{second}|\\
\optional[first]{second}\\[1ex]
%
\verb|\optional[]{second}|\\
\optional[]{second}\\[1ex]
%
\verb|\optional{only}|\\
\optional{only}\\[1ex]
%
\verb|\optional[\enquote{quote}]{second}|\\
\optional[\enquote{quote}]{second}\\[1ex]
%
\verb|\optional[``quote'']{second}|\\
\optional[``quote'']{second} % why does this go wrong?
\end{tabular}
\end{document}

