gps: fixed logic for finding the best package

Fixed the logic for finding the best package,
as it was always picking the last package in
the list as the best (regardless of which package
had the highest version) if there were multiple
packages with higher versions that the current.

Change-Id: Ibd61f0a050d65feb8bb1584f59b0a11974333af5