Strange bug found in DeviceManager::getDeviceCount