Better clean-up in the DeviceItem initialization when we hit an error.