Fix unordered teardown when no devices found