Fix infinite loop when skipping unsafe timed tests.

We need to make sure the timeout is updated also when the test is
skipped, otherwise it will reattempt the timed test over and over.

(cherry picked from commit 009f4cb33e6cc56f9861e6314b620c2fa453db0b)