Fix some more intermittent test failures (hopefully the last ones).