Exception thrown when syncing contacts with a photo

When I add an image to one of the contacts and try do sync, DAVdroid throws an exception:

EXCEPTION:
java.lang.ClassCastException: android.content.res.AssetFileDescriptor cannot be cast to java.io.Closeable
at at.bitfire.vcard4android.AndroidContact.populatePhoto(AndroidContact.kt:293)
at at.bitfire.vcard4android.AndroidContact.getContact(AndroidContact.kt:140)
at at.bitfire.davdroid.resource.LocalContact.getCachedGroupMemberships(LocalContact.java:251)
at at.bitfire.davdroid.syncadapter.ContactsSyncManager.prepareDirty(ContactsSyncManager.java:214)
at at.bitfire.davdroid.syncadapter.SyncManager.performSync(SyncManager.java:152)
at at.bitfire.davdroid.syncadapter.ContactsSyncAdapterService$ContactsSyncAdapter.onPerformSync(ContactsSyncAdapterService.java:70)
at android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:257)