r12250: Patch from Martin Koeppe <mkoeppe@gmx.de> for #3287