This results in 

    ...
    Module osha.oira.content.library, line 135, in render
    Module osha.oira.content.library, line 110, in assign_ids
    ...
    Module Products.CMFUid.UniqueIdAnnotationTool, line 86, in handleUidAnnotationEvent
    AttributeError: 'NoneType' object has no attribute 'unregister'
    > /home/oira/oira/eggs/Products.CMFUid-2.2.1-py2.6.egg/Products/CMFUid/UniqueIdAnnotationTool.py(86)handleUidAnnotationEvent()
    -> uid_handler.unregister(ob)

because `uid_handler` is None, which is fetched via `uid_handler = getToolByName(ob, 'portal_uidhandler', None)`.
The problem seems to be that `ob` does not provide enough context to fetch the portal_uidhandler

    (Pdb) ob
    <Solution at 344/345/175>

The 2 lines above can be replaced by

    parent._delOb(old_id)
    parent._setOb(new_id, item)

But then the same error happens at a later stage (see comment below)