Fixed a race condition in BytesRefUtils