[Tex/LaTex] tikzscale and \tikzsetnextfilename do not work together

tikz-externaltikz-pgftikzscale

\tikzsetnextfilename does not work with tikzscale package. In the MWE, included file is A.tikz which should produce A.pdf. MWE works if tikzscale is not used.

MWE:

\documentclass{report}
\usepackage{tikz,tikzscale}
\usetikzlibrary{external}
\tikzexternalize
%
\begin{filecontents}{A.tikz}
  \begin{tikzpicture}
    \draw (0,0) rectangle (2,2);
  \end{tikzpicture}
\end{filecontents}
%
\begin{document}
    \newcommand{\figFilename}{}
    \renewcommand{\figFilename}{A}
    \tikzsetnextfilename{\figFilename}
    %\input{\figFilename.tikz}
    \includegraphics[width=\linewidth]{\figFilename.tikz}
\end{document}

Best Answer

With Christian's fix of "get next filename", which is already built and can be downloaded, the mentioned problem seems to be fixed, too. Thanks for the report and please post if the problem still occurs to you.