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