Backport #7259 to stable5
Merge pull request #7362 from owncloud/fix-7259-5

Backport #7259 to stable5