UART over multiple Arduinos mysterious problem

Post the complete sketch, I can tell you almost nothing about this short excerpt, I even cannot see the variable declarations and the like. If you're able to get the same problem with a shortened sketch we're happy to look over less lines of code but in at least 1 out of 4 cases the error was not in the posted excerpt in the past.
As you're using the String class I would bet on a memory problem (you do know that the ATmega328 has a quarter of the memory of the ATmega2560?).