Adapt to concurrency changes of https://github.com/scala/scala/pull/3903