Solution (source code)

= Solution

The independence fails after conditioning on $S=1$. Since $S$ is a descendant of collider $M$, selection opens $D\to C\to M\leftarrow A\leftarrow G$.