Your initial ISR may read the erroneous value if an interrupt occurs in the middle of any of those instructions and alters the data. Therefore, before performing any operations on it, you must disable interrupts and designate the variable volatile.