I have a function of the form $$f(x,y) = \int_{0}^{\infty} H(x,y,z) \mu(z) dz$$ where $$H(x,y,z) = \begin{cases} 1 \text{ if } g(x,y) \geq z \\ 0 \text{ otherwise} \end{cases}$$ for some strictly increasing continuously differentiable function $g$, and $\int_{0}^{\infty} \mu(z) dz= 1$.
Since the Dirac Delta function is the derivative of the Heavyside function, I have that $$\frac{\partial H}{\partial x} = \delta(g(x,y)-z)$$
Exchanging integration and differentiation, this gives me $$\frac{\partial f}{\partial x} = \int_{0}^{\infty} \delta(g(x,y)-z)\mu(z)dz = \mu(g(x,y))$$
Now, if I take the derivative of this with respect to y, I get $$\frac{\partial^2 f}{\partial x \partial y} =\mu'(g(x,y)) \frac{\partial g}{\partial y}.$$
If I first differentiated with respect to $y$, and then differentiated with respect to $x$, I would get $$\frac{\partial^2 f}{\partial y \partial x} =\mu'(g(x,y)) \frac{\partial g}{\partial x}.$$
The two second-derivatives are not necessarily equal. Is this normal for distributional derivatives, or did I make a mistake somewhere?