Diffuse x-ray scattering from statistically inhomogeneous distributions of threading dislocations beyond the ergodic hypothesis