I split a train in half (Pic 1) while building a station. Then as I was trying to get it to reconnect I noticed that the bottom half of the train is unable to connect to the top half. (Pic 2) Then I tried to connect the top to the bottom, it also would not connect (Pic 3). At this point I moved the bottom train slightly, you can note the distance moved by referencing the signal light on the car carrying the stack inserters. Then I tried again and the bottom half still wouldn't connect (Pic 4) but the top half finally did get the connection completed. (Pic 5) I'm sure this has to do with it being right on the split, but I thought it may be something to be fixed.
Try to connect it again by hovering over the wagon on the left (the one on the straight rail). It will fail.
Try to connect it again by hovering over the wagon on the right (the one on the curved rail). It will work!
* As you can see in the image the wagons are connected in the original setup. But sometimes when you build them with robots they are not connected. From my testing this depends on the build order. If the one on the straight rail is build first, they will connect. Otherwise they won't connect. I did a search for this and it looks like this is a minimal case for this topic: 76063.
It actually makes sense, because the wagon on the right has only one way how to continue searching, while the one on the left has natural way to go straight.
The general rule is, that if you want your trains to work reliably in blueprints, don't blueprint rails in intersections.
I mean, yes, it could be solved somehow, with a lot of work, but I prefer to keep this part of the code simple.