Thanks to Oliver Henshaw for the initial patch and bug report BUG: 278206 (cherry picked from commit 0f5ffd8e)