I think the problem depends on the feature that the KI tries to use all bus stations / tracks on railway stations evenly. On railroad this is solved by signals. With busses or trams I had good results by placing a stop on both side of the street (they are automatically grouped together) and doing two lines: one runs A-B-C-D and the other one D-C-B-A. during build time sometimes twists in mysterious ways but in the the end it normally snaps to the correct route in the end.
Especially with trams, tram railways also help (just don’t build them everywhere).
BTW: I am a fan of circle lines since CIM1. I know they are uncommon in real life but there are exceptions, for example the Circle Line in the city of London.