I've rewritten the patch from comment #77 in order to be able to apply it to the latest version, 7.15.