CalculateTrainPosition: Improve the location of unlinked BGs by adhering to an later passed linked BG.

Signed-off-by: UweSteinkeFromSiemens <uwe.steinke@siemens.com>