tests/state_attr.cpp: Fix double extraction tests
We want to extract the state attribute twice from the DeviceAttribute but only read it once.
Wrong since it's introduction in eb8391dc (DeviceAttribute: Allow extracting the DEV_STATE attribute multiple times, 2022-02-02) and only found due to careful review on the backports MR1.
Response to !943 (comment 1019074243).