Fix additional issue #2225

Earlier commit with the same title missed one of the cases
causing the duplicate task_id argument error (i.e., when using
AMQP).  This commit addresses the issue.