Updated to make matchUntilHalt test is determinate