items.c: get_instance_id function is used in item_free