Fix invalid memory semantics in barrier tests