What happens when Serial1 is directly connected to Serial2/3 on Mega 2560?

Try reading your sketch again.
Carefully.