patchutils.py: Another small fix to prefer the longest matching version string.