Plone.restapi or ZODB issue: ValueError: could not convert string to int?

Has anyone seem this error with Plone 5.2?

The issue is clearly an index corruption that happened within a migration after a series of plone.restapi calls.

The affected field index is department which is defined in two content-types as a Choice field connected to a vocabulary. However the affected Python pickle of the underlaying index structure indicates that a content object was indexed which has a parent folder with ID the usual acquisition hell