Xids must be unique across threads; make generator static