This bug has been copied from bug #361861 and has been proposed to be backported to 4.7 z-stream (EUS).