Let $X$ and $Y$ be compact Hausdorff spaces and let $\varphi:X\to Y$ be continuous with a property that if $A$ is a nowhere dense zero-set in $Y$, then $\varphi^{-1}(A)$ is nowhere dense in $X$. Let $Z=\varphi(X)$.
Does $\varphi$ still have the analogous property as a map into $Z$?
Note that the condition implies that the set $J_{Z}$ of $f\in C(Y)$ which vanish on $Z$ is a $\sigma$-ideal in $C(Y)$, which means that it contains all existing supremums of countable sets in $J_{Z}$. Such $Z$'s could be considered countable analogues of regular closed sets, because $Z$ is regular if and only if $J_{Z}$ contains existing supremums of all sets.