### Summary

Using `apt` with `only_upgrade: yes` fails if a package is currently not installed. It seems this was recently introduced with https://github.com/ansible/ansible/pull/78327. For us this was a breaking change - was this intentionally?

### Issue Type

Bug Report

### Component Name

apt

### Ansible Version

```console
$ ansible --version
ansible [core 2.13.4]
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/vagrant/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/vagrant/.local/lib/python3.8/site-packages/ansible
  ansible collection location = /home/vagrant/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/bin/ansible
  python version = 3.8.10 (default, Jun 22 2022, 20:18:18) [GCC 9.4.0]
  jinja version = 3.1.2
  libyaml = True
```


### Configuration

```console
# if using a version older than ansible-core 2.12 you should omit the '-t all'
$ ansible-config dump --only-changed -t all
empty for me
```


### OS / Environment

ubuntu/focal64 20220804.0.0 (vagrant box)

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
- name: upgrade if installed
  apt:
    name: "{{ packages }}"
    only_upgrade: yes
  vars:
    packages:
      - foo # not installed
      - bar
```


### Expected Results

no failure if a package is currently not installed

### Actual Results

```console
TASK [my_role : upgrade if installed.] ***********************************************************************************************************************
fatal: [127.0.0.1]: FAILED! => {"cache_update_time": 1663062238, "cache_updated": false, "changed": false, "msg": "no available installation candidate for foo"}
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
version_installable = None
    if package_is_installed:
        try:
            installed_version = pkg.installed.version
        except AttributeError:
            installed_version = pkg.installedVersion
        if version_cmp == "=":
            # ch
            version_is_installed = fnmatch.fnmatch(installed_version, version)
            if version_best and installed_version != version_best and fnmatch.fnmatch(version_best, version):
                version_installable = version_best
        elif version_cmp == ">=":
            version_is_installed = apt_pkg.version_compare(installed_version, version) >= 0
            if version_best and installed_version != version_best and apt_pkg.version_compare(version_best, version) >= 0:
                version_installable = version_best
        else:
            version_is_installed = True
            if version_best and installed_version != version_best:
                version_installable = version_best
    else:
        version_installable = version_best
    return package_is_installed, version_is_installed, version_installable, has_files
def expand_dpkg_options(dpkg_options_compressed):
    options_list = dpkg_options_compressed.split(',')
    dpkg_options = ""
    for dpkg_option in options_list:
        dpkg_options = '%s -o "Dpkg::Options::=--%s"' \
                       % (dpkg_options, dpkg_option)
    return dpkg_options.strip()
def expand_pkgspec_from_fnmatches(m, pkgspec, cache):