Add test for #18908

Currently the testing framework guarantees that a test is only run once for each test run, so it's probably ok to remove this. We've got a good number of tests elsewhere that aren't threadsafe to run in parallel either (use of `static mut` globals similarly).