Let $X$ be a reasonably nice topological space (say, a connected CW complex), and let $Y$ and $Z$ be reasonably nice connected subspaces of $X$ such that $X = Y \cup Z$.

Suppose that $Y$, $Z$, and $Y\cap Z$ are aspherical, and the homomorphism $\pi_1(Y\cap Z)\to \pi_1(Y)$ induced by inclusion is injective. Does it follow that $X$ is also aspherical?

I think this is true, but I have been unable to construct a proof. If excision held for homotopy groups, then we would know that $\pi_n(X,Z) \cong \pi_n(Y,Y\cap Z) = 0$ for all $n \geq 2$, and it would follow from the long exact sequence for $(X,Z)$ that $\pi_n(X) = 0$ for all $n\geq 2$.

However, this does not appear to be a case to which excision applies. It seems that both $\pi_1(Y,Y\cap Z)$ and $\pi_2(Z,Y\cap Z)$ may be nonzero, so the pair $(Y,Y\cap Z)$ is potentially only $0$-connected, and the pair $(Z,Y\cap Z)$ is potentially only $1$-connected.

So, is it true that $X$ is always aspherical under these circumstances?