I thought maybe it was something to do with concurrency, and somehow x is affected by a race condition there.