Fix RetryTask tries parameter to not be passed on by copy