Make test more robust to other tests leaving things in a bad state.