Clean up purge_state_snapshot logic