Depth buffer values are stored logarithmically, which means approximately half of your precision is used to represent the values between the near plane and twice the near plane.
I tried lowering the z distance to 500, but it was already only 5000 which is well below 16 bit.
This is a simplification, but to illustrate -- with a 16-bit buffer imagine a pixel with depth of near == 0x0, a pixel with depth of far == 0xFFFF, and a pixel at 2 * near == 0x7FFF.
So, it's very important that you don't use a small value for the near plane. The far-plane isn't very important in comparison.