Fix 9969

Resolving 9969 resubmitting to fix rebase issue. Please see https://github.com/owncloud/core/pull/9986 for blunder.

Fixes #9969