Python error when running “Clean Library”

So I recently moved around a bunch of my video files from one HDD to another. After scanning the new ones, I wanted to get rid of the now deprecated old entries altogether. So I ran “Clean Library” under Media Settings.
What then happens is Kodi more or less freezes a couple of seconds into the process, while the syslog is being hammered with gigabytes of log data, until the disk runs out of space, with just these messages:

Code:
compiz[2346]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.
compiz[2346]: extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.

Apparently this is not exclusive to my use case, see this thread for reference

Ubuntu 16.10.
Kodi 17 RC3