Why does uncommenting the (IMHO innocent) call to \settocdepth{chapter}
in the following MWE make the list of listings become blank? Or rather: what can I do to both preserve a chapter-only TOC for the appendix and keep the list of listings "alive"?
\documentclass{memoir}
\usepackage{listings}
\begin{document}
\tableofcontents
\lstlistoflistings
\newpage
\chapter{A chapter}
\begin{lstlisting}[float,caption={Foo},label={lst:foo}]
Foo code
\end{lstlisting}
\newpage
%\settocdepth{chapter} % uncomment --> list of listings empty
\appendix
\chapter{Foo}
Bar
\end{document}