None of the callers actually need the device itself. So it makes sense to do the lookup inside determine_state_file instead. (cherry picked from commit 8e707663)