*Note*: Before submitting this pull request, please review our [contributing guidelines](https://docs.celeryq.dev/en/main/contributing.html).

## Description

My previous attempt (#8383) introduced a breaking change. This PR however should only contain the bear minimum to fix the issue without interfering with the current behaviour.

Fixes #7715, fixes #8472 

Fix eager tasks does not populate name field. *Note*: Before submitting this pull request, please review our [contributing guidelines](https://docs.celeryq.dev/en/main/contributing.html).

## Description

My previous attempt (#8383) introduced a breaking change. This PR however should only contain the bear minimum to fix the issue without interfering with the current behaviour.

Fixes #7715, fixes #8472 

# Test config for t/integration/test_worker.py

broker_url = 'amqp://guest:guest@foobar:1234//'

# Fail fast for test_run_worker
broker_connection_retry_on_startup = False
broker_connection_retry = False
broker_connection_timeout = 0

worker_log_color = False

worker_redirect_stdouts = False

# Test config for t/integration/test_worker.py

broker_url = 'amqp://guest:guest@foobar:1234//'

# Fail fast for test_run_worker
broker_connection_retry_on_startup = False
broker_connection_retry = False
broker_connection_timeout = 0

worker_log_color = False

worker_redirect_stdouts = False
