!UPSTREAM: Some fixes for the clip distance lowering

TODO:
- Merge into to the clip distance patch