Without looking at the code…
Could the problem be that ffi is now in core and your don’t need to add it?