De-duplicate identifier serializer logic.