The only error I can see within your code snippets is:
data[0..n-1] = I2C_MasterReadByte(I2C_NAK_DATA); // read N bytes
only the last byte red has to be NAKed, all others [0..n-2] must be ACKed.
Extremely helpful thank you. Naturally we are working with single data bytes so would not have got bitten by the ACK issue until later.
Best wishes for the season.
Glad to have helped you a bit (or even a byte)