Yes I know #8 had a frigate factory. But you could have gotten trade port on your starbase. Hell you could have gottenf rigate factory on the starbase also.
And the way the game calculates longest trade route is such that it counts the longest path between any 2 of your tradeports, usign the shortest routes. If you can get from A to B by going through C, it won't count a route thats A,D,F,G,H,B. It will only count A,C,B.