I'm astonished that anything worked without this! Fixes Trac #14339 (cherry picked from commit 13fdca3d)