+$seq2->layer('top');
+$seq->layer('bottom');
+
+check $seq2, 'mods folding with clips and layers', <<'RES';
+\begin{pgfonlayer}{top}
+\begin{scope} [color=red]
+\clip clip2 ;
+\begin{scope}
+\clip clip1 ;
+\begin{pgfonlayer}{bottom}
+\begin{scope} [color=red]
+\clip clip2 ;
+\begin{scope}
+\clip clip1 ;
+\draw foo ;
+\draw bar ;
+\end{scope}
+\end{scope}
+\end{pgfonlayer}
+\draw baz ;
+\end{scope}
+\end{scope}
+\end{pgfonlayer}
+RES
+