Fix flakiness (order-dependence) in target test