I've noticed this patch and had a quick look at it. As far as I understand, this bug does not lead to an incorrect matching, resulting only in degradation in speed. Anyway, consider this patch useful, hope it will be committed soon.
-- Best regards, Maxim Orlov.