Fix compilation error in inventory's custom persistence handler