Arduino as I2C Slave returns sometimes 0 bytes instead of 4.

Yes, let's hope so.
I'm not investigating it further. I just use the delay.
Thanks for all you help.

I have this also without use of the Serial library and without USB connection.
I made the system led turn on (in the Master and in the Slave) if that error occurs, to be able to run it without my computer.
Perhaps that optimization for timer0 has effect on this.

Is this the file for millis ? The normal Arduino library seems the same for the Arduino Uno and Arduino Leonardo.
https://github.com/arduino/Arduino/blob/master/hardware/arduino/cores/arduino/wiring.c

This came to my mind: The functions endTransmission() and requestFrom() need time for the parameters and stack and so. Suppose there will be a total time of 4us for that. With de delay of 6us, the total between the 'real' action is 10us. That is remarkable, since 10us is a clock pulse of the I2C at 100kHz.