solver: Check if a package is available before trying to upgrade at least this version

if that's not the case, we just fall back to the previous behavior. In practice, this should not happen to often ...