To reduce lag, it doesn't regularly reset the value. Instead, it resets each individual ore tile when they run out to a very large value. What is probably happening in this situation is you had an regular old ore patch without billions of ore, and as each ore tile began to run out, it reset that value to an incredibly large value, inflating the value of the ore patch. However, each individual tile will never go above the integer limit and overflow, because it always is getting reset to a value below the integer limit. The patch of ore might go above 2.147 billion and overflow, but that should only be visual