Fix bug causing done handler to fail after direct S3 upload

[#82948310]

Release version 0.5.2