More state_id fix, related to 4a260a855e1e7e9495db60df2ba0ae40d14e7b94.