AttributeError: type object 'IWickedQuery' has no attribute '__iro__'

Hello! We are attempting to upgrade an old Plone 3 site to Plone 5 on Debian. Presently we are getting this traceback in the logs when things fail:

plone_1      | 2017-06-07T01:18:35 ERROR ZODB.Connection Couldn't load state for 0x44a6
plone_1      | Traceback (most recent call last):
plone_1      |   File "/plone/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 860, in setstate
plone_1      |     self._setstate(obj)
plone_1      |   File "/plone/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/Connection.py", line 914, in _setstate
plone_1      |     self._reader.setGhostState(obj, p)
plone_1      |   File "/plone/buildout-cache/eggs/ZODB3-3.10.7-py2.7-linux-x86_64.egg/ZODB/serialize.py", line 613, in setGhostState
plone_1      |     obj.__setstate__(state)
plone_1      |   File "/plone/buildout-cache/eggs/zope.component-3.9.5-py2.7.egg/zope/component/persistentregistry.py", line 40, in __setstate__
plone_1      |     self._createLookup()
plone_1      |   File "/plone/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 91, in _createLookup
plone_1      |     self._v_lookup = self.LookupClass(self)
plone_1      |   File "/plone/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 439, in __init__
plone_1      |     self.init_extendors()
plone_1      |   File "/plone/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 476, in init_extendors
plone_1      |     self.add_extendor(p)
plone_1      |   File "/plone/buildout-cache/eggs/zope.interface-3.6.7-py2.7-linux-x86_64.egg/zope/interface/adapter.py", line 480, in add_extendor
plone_1      |     for i in provided.__iro__:
plone_1      | AttributeError: type object 'IWickedQuery' has no attribute '__iro__'

Any idea what might be causing this and a possible solution?

Could your problem be related to this? Cleaning up a wicked mess

How did You solve this? I have similar problem when update on 5.0