Let $E$ be a locally compact metric space. We consider a diffusion process $X=(\{X_t\}_{t \ge0 },\{P_x\}_{x \in E})$ on $E$ whose lifetime $\zeta$ may be finite: $P_x(\zeta<\infty)>0$ for some $x \in E$.
For a subset $B \subset E$, we set $\sigma_B=\inf\{t>0 \mid X_t \in B\}$ and $\tau_B=\inf\{t>0 \mid X_t \notin B\}$. It is well-known that for any open $U \subset E$ and bounded $u \colon \overline{U} \to \mathbb{R}$, the function $h:=E_{(\cdot)}[u(X_{\tau_U})]$ is harmonic on $U$ with respect to $X$. That is, for any relatively compact open subset $G \subset U$, we have $h(x)=E_{x}[h(X_{\tau_G})]$, $x \in G$ [this is due to the strong Markov property of $X$].
It is easy to see that $\tau_U=\sigma_{E \setminus U}\wedge \zeta$ for any open $U \subset E$. Thus, $\tau_U \neq \sigma_{E \setminus U}$ in general.
My question
Let $K \subset E$ be closed subset. For bounded Borel $u \colon E \to \mathbb{R}$, we set $f(x)=E_{x}[u(X_{\sigma_K})]$, $x \in E$. We assume for any closed $L \subset E$ such that $K \subset L$, $\sigma_K=\sigma_L+\sigma_{K}\circ \theta_{\sigma_L}$ [this assumption may be unnecessary if $X$ is symmetric]. Here, $\theta$ denotes the shift operator of $X$.
Then, $f$ should not be a harmonic function with respect to $X$.
What kind of function would this be?