Redifining Volatile Error

I've no direct experience but, I've read other posts to the effect that using nointerrupts() and its opposite number is preferable to detaching/reattaching interrupts.

The difference is that an interrupt that comes in while detached is simply gone, it never existed. Interrupts arriving while disabled via noInterrupts() will be latched and acted upon when re-enabled via interrupts().