Fix for #4589.