已知线性方程组 $\left\{\begin{array}{l}a x_1+x_3=1 \\ x_1+a x_2+x_3=0 \\ x_1+2 x_2+a x_3=0 \\ a x_1+b x_2=2\end{array}\right.$ 有解, 其中 $a, b$ 为常数.若 $\left|\begin{array}{lll}a & 0 & 1 \\ 1 & a & 1 \\ 1 & 2 & a\end{array}\right|=4$ ,则 $\left|\begin{array}{lll}1 & a & 1 \\ 1 & 2 & a \\ a & b & 0\end{array}\right|=$ $\qquad$
$\text{A.}$
$\text{B.}$
$\text{C.}$
$\text{D.}$