This is a pointer to default_device. Maybe we should make that more explicit in the code and don't let `get_nth_device()` write to default_device itself.