Observation:
In the following scenario the train came from north and wants to go south.
From what I can tell it chose the shortest path, straight through the circle.
However if the train choses this path it enters a separate short block, block 2.
The train can not leave block 2 because part of the train is still in the surrounding block 1, thus the signal to leave block 2 and enter block 1 is red.

In case you wonder what's this block 2 for - that's where I normally park my ride

If the train logic would not only consider the train's head (telling signals to turn from green to yellow) but also the train's body on the calculated path it would find out that part of the train is still in and therefore reserving block 1 when it would try to leave block 2 and enter block 1. Ergo this solution is not considered, as there is no path, leaving only the other solution, going around the circle and staying in block 1, which I would consider the correct solution.
*) "bad" in the sense of "not suitable for train route planner"