https://github.com/celery/celery/issues/2357
Optimization for #2358