test: fix global `sel` variable leak