Fix opbeat_enabled flag in inventory files + simplify when statement