uint16_t RowIndx; is a local uint8_t CursRow; is a global
In Debug mode this:
if(CursRow + RowIndx == 1)
was true and in Release mode it was not.
After changing it to
if((CursRow + RowIndx) == 1)
it worked for both Debug and release. In both cases the variables added to 1
I am puzzled and a bit worried that there might be something else wrong.