Substitution of a random variable into a stochastic integral I am faced with the following fact while reading a paper:
Let $\{ \mathcal{F}_t \}_{t \in [0,T]} $ be the filtration generated by a one-dimensional Brownian motion $\{ B_t \}_{t \in [0,T]} $ defined on some probability space. Let $\{X_t (y) \}_{t \in [s,T]}$ be an adapted process, for each $y \in \mathbb{R}.$ Then, for any random variable $\eta$ that is $ \mathcal{F}_s$-measurable, the author claims that for every $t \in [s,T],$

$$ \bigg\{ \int_s^t X_r (y) \, dB_r \bigg\} \bigg|_{y= \eta} = \int_s^t X_r (\eta) \, dB_r.$$

The argument is that the stochastic integral $\int_s^t X_r (y) \, dB_r$ is $\sigma \big\{ B_r - B_s, r \in [s,T] \big\}$-adapted and is therefore independent of $ \mathcal{F}_s$, and in particular, independent of $\eta$. Therefore, direct substitution is allowed. 
I am wondering if there is any result in the literature that guarantees direct substitution of a random variable into a stochastic integral, given its independence? I cannot show it directly from its definition.
 A: I think that the assertion is, in general, wrong. The problem is, essentially, the following: If $F(y)$ is for each $y \in \mathbb{R}$ a random variable which is only defined up to a null set, then the expression
$$F(y) \bigg|_{y=\eta}$$
is ill-defined. There are null sets building up; depending on which representation we choose for $F(y)$ we get totally different results. 
The same problem pops up when one tries to generalize the pull out property of the conditional expectation (see this question).

Here is an illustrating example for the problem your are considering:
Fix $0 < s \leq T <\infty$ and consider
$$X_r(y) := 1_{\{y\}}(B_s) \qquad \eta := B_s.$$
Since $\mathbb{P}(B_s=y)=0$ for any $y \in \mathbb{R}$, we have by Itô's isometry
$$\mathbb{E} \left( \left|  \int_s^t X_r(y) \, dB_r \right|^2 \right) ,$$
and therefore
$$F(y) :=  \int_s^t X_r(y) \, dB_r = 0.$$
(The stochastic integrals is only defined up to null set and therefore we can choose $F(y,\omega)=0$, $\omega \in \Omega$ as a representative.) Hence, $F(\eta) =F(B_s)=0$ almost surely. On the other hand, we have
$$\int_s^t X_r(\eta) \, dB_r = \int_s^t 1_{\{B_s\}}(B_s) \, dB_r = B_t-B_s.$$
Thus,
$$0 = F(\eta) \neq \int_s^t X_r(\eta) \, dB_r = B_t-B_s.$$
