I haven't tested this patch (don't really know how to), but this could very well be the cause of this long-standing bug: