Possible fix for #8180

More info see https://github.com/owncloud/core/issues/8180#issuecomment-51488885