fix non-determinism in test case string match