Avoid race condition in tag test