OCP\Contacts\IManager#search() only returns system users

So, on my dev instance I have some version of v22 running. Created contacts in the contacts app. In my app, I can retrieve the new contacts by searching for ''.
On my production instance (v21), I already have contacts, so I haven’t created any, but when searching for '' I only get back the system users. Even when going through the address books, I can see my address book, but search doesn’t yield any entries in v21. Is that a known bug that was fixed? Am I missing something?

I’ve since realized that, since I was running that code in a BackgroundJob and was switching users using UserSession#setUser, Contacts\IManager doesn’t know when I’m switching users and instead always gives me the first user’s contacts. Luckily OCA\DAV\CardDAV\ContactsManager allows switching users (although that’s probably not a public API, but here I go…)