# Regular integrable connections and regular holonomic modules

I am trying to prove the following $\mathrm{Conn}^{\mathrm{reg}}(X) = \mathrm{Conn}(X) \cap \mathrm{Mod}_{rh}(\mathcal{D}_X)$. Here an integrable connection on a smooth algebraic variety $X$ is a $\mathcal{D}_X$ module which is locally free over $\mathcal{O}_X$ of finite rank. Regular integrable connections and regular holonomic modules are defined as in the book $\mathcal{D}$-modules, perverse sheaves and representation theory. The inclusion of the left-hand side into the right-hand side is easy because the composition factors of an integrable connection are integrable connections and regularity is closed under submodules, quotient modules and extensions. Where I got stuck is the other inclusion. Let $M$ be an integrable connection which is regular holonomic. Let $L_i$ a composition factor on $M$, then $L_i \simeq L(Y_i, N_i)$ where $N_i$ is a regular integrable connection on $Y_i$, and $Y_i$ is a locally closed smooth subvariety of $X$ such that the inclusion is affine. We notice that ($L_i$ is an integrable connection) we have $L(X,L_i) \simeq L_i \simeq L(Y_i, N_i)$. Therefore, by Theorem 3.4.2. on the same book, we have that $Y_i$ is dense (hence open being locally closed) and there exists a dense open subset $Y$ of $Y_i$ (which is, therefore, open dense in $X$) such that $L_i \vert_Y \simeq N_i \vert_Y$. Here is where I got stuck because I do not understand how I can conclude that the whole $L_i$ is a regular integrable connection, which is what I want to prove in order to prove that $M$ is a regular integrable connection.