Distribution symmetry given some information This is a follow-up to Distribution symmetry proof.

I have four dependent random variables $X,Y,Z,U$ and a well-behaved function $g:\mathbb{R}^2\to\mathbb{R}$. Suppose that $X$ and $Y$ are conditionally independent and identically distributed, given that $U=u$.
How can I prove that the random vectors $(g(X,Z),g(Y,Z))$ and $(g(Y,Z),g(X,Z))$ have the same distribution?
Defining $h_z(t)=g(t,z)$ and letting $A$ and $B$ be Borel sets, is the following reasoning correct?
\begin{align}
P(g(X,Z)\in A,g(Y,Z)\in B) &= \int P(g(X,z)\in A,g(Y,z)\in B\mid Z=z,U=u)\,dP_{Z,U}(z,u) \\
&= \int P(X \in h_z^{-1}(A),Y\in h_z^{-1}(B)\mid Z=z,U=u)\,dP_{Z,U}(z,u) \\
&= \int P(Y \in h_z^{-1}(A),X\in h_z^{-1}(B)\mid Z=z,U=u)\,dP_{Z,U}(z,u) \\
&= \int P(g(Y,z)\in A,g(X,z)\in B\mid Z=z,U=u)\,dP_{Z,U}(z,u) \\
&=P(g(Y,Z)\in A,g(X,Z)\in B).
\end{align}
 A: There's a problem in the reasoning above.
There was an equality $$\int P(X \in h_z^{-1}(A),Y\in h_z^{-1}(B)\mid Z=z,U=u)\,dP_{Z,U}(z,u) \\= \int P(Y \in h_z^{-1}(A),X\in h_z^{-1}(B)\mid Z=z,U=u)\,dP_{Z,U}(z,u), $$
so it looks like you supposed that $$P(X \in C,Y\in D\mid Z=z,U=u) = \\
= P(Y \in C,X\in D\mid Z=z,U=u) \quad (*)$$
We know that $$P(X \in C, Y \in D | U =u) = P(Y \in C, X \in D | U =u) = P(Y \in C | U) P(X \in D | U =u) \quad (**).$$
but (*) doesn't follow from (**) so there's a problem in the reasoning above. Let us prove it.
Suppose that we know $(**)$. Let's give an example when (*) is not true. Suppose that three r.v. $U$, $X=Z$ and $Y$ are independent. Then we may rewrite (**) as
$$P(X \in C, Y \in D) = P(Y \in C, X \in D) = P(Y \in C) P(X \in D)$$
and hence $(**)$ holds.
Now suppose that $z \in C \backslash D$ (and $Z=X$ as before). Hence $(*)$ may be written as
$$P(X \in C,Y\in D\mid Z=z,U=u) = P(Y \in C,X\in D\mid Z=z,U=u) \Longleftrightarrow $$
$$ \Longleftrightarrow P(z \in C,Y\in D\mid Z=z,U=u) = P(Y \in C,z\in D\mid Z=z,U=u) \Longleftrightarrow $$
$$ \Longleftrightarrow P(Y\in D\mid Z=z,U=u) =0$$
$$  \Longleftrightarrow   P(Y\in D) = 0$$
for all $D$. We got a contradiction.
