fix bug in IteratorSplitter caused by race condition, and modify tests so bug appears on every test run