Xcode bug? 'Set current row of matrix' doesn't work

My script completes an action when the second row of a matrix is clicked (so that’s utilising the ‘on clicked’ handler called by the radio button on row two of the matrix).

If the action fails (it pings a machine, incidentally) it throws up an error message and SHOULD revert the matrix back to its original state where row 1 is selected. It doesn’t.

Instead, when the error message flashes up (it’s a ‘display alert’ so the app ‘pauses’ until you click OK) you can see both radio buttons that form the two-row matrix are ‘selected’ and blue. When you click away the alert, row 1 of the matrix is indeed selected for a fraction of a second, but then the current row snaps back to row 2.

It feels like the logic of the applescript and the logic of the aqua interface have a disagreement…and aqua wins. How can I work around this? If I put in a delay I get an “applescript error -1762” (not that I want a delay anyway)…