[corlib] Fix race in unit test