Update tempid of orphans items.