Hi,
Please consider the attached for inclusion in the 5.0 queue. The justification should be apparent from reading the referenced bugzilla report. The upstream commit is 40ba1d9b4d19796afc9b7ece872f5f3e8f5e2c13 but I have attached the patch that was originally posted by Pablo because it can be applied to 5.0 without fuzz.