Depth blit using glBlitFramebuffer yields wrong results when GL_FRAMEBUFFER_SRGB is enabled

When blitting a depth attachment to the window’s depth buffer, the depth values change if GL_FRAMEBUFFER_SRGB is enabled. This happens if depth and color are blitted separately or at the same time. This is also independent of the source FBO’s color attachments pixel format in so far that it happens for non-srgb and srgb pixel formats.

Only if GL_FRAMEBUFFER_SRGB is disabled when the depth buffer is blit, the depth values are copied as is. I encountered this issue on Windows 10 using a 1060 with driver version 398.82.
And it also happens on Windows 10, GTX 970, driver version 397.64 and on Linux (64 Bit), GTX 1060, drivers 396.51.

I have a minimal example program here (with some redundant explanations in the README):