Fortunately for you, your compiler stored the constant variable in a writable section of memory (which it only does if you ask for the address of the variable) so it happened to be writable and not cause a seg-fault.
I think this is what is happening, correct me if I am wrong:
The 10 come from the compiler replaces some instances of i with 10 at compile time, however in other places it must use real memory (which you have illegally changed to 15).