Details are in docker/distribution#748 but we need to fix this for 1.8. We'll need to fix this in distribution then update the vendored version. History repeating itself: #10402.