Consider a particle passing through a slit of width d. The slit introduces an uncertainty in momentum of approximately ⁠ h / d ⁠ because the particle passes through the wall. But let us determine the momentum of the particle by measuring the recoil of the wall. In doing so, we find the momentum of the particle to arbitrary accuracy by conservation of momentum.