Minor change to logic of s3 client compat mode.
Merging in latest changes.