sweep2unlock: use an additional variable to determine if the barrier is already breached