inventory_dir appears to be a special variable name. Switching to inv_dir fixed the problem