s3: Remove a global variable in bugfix for bug 7665