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