The private API here doesn't have the backends yet properly initialized, probably another bug but let's go with the easy bug fix here. Next step is to write integration tests and then figure out why changing this to the private API (which it actually calls) doesn't work.
Fixes https://github.com/nextcloud/server/issues/5950
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>