[master] Fix S3 connection regression

Fix for https://github.com/owncloud/core/issues/11714 (master version)

Note that on master the unit tests were already broken.
Before fe912ca9b829736693be6128bae15bca052339bc:
S..EEEEE...............................E...EE...E..EEEEEE.
On this branch:
S..EEEEE...............................E...EE...E..EEEEEE.