The brown lines were where my trade lines were before I colonized that dead asteroid in the lower right corner on the picture.
Not a bug. Putting a trade port on that dead asteroid did indeed shorten your longest trade route.
That terran planet is a choke point in your trade network, so it's the planet to count from. Going from it to the ice planet that terminates your trade route, you have 6 jumps. The reason why your trade port no longer extends to the dead asteroid beyond the ice is that you created a shortcut. From the terran to that upper-left dead asteroid, it's five jumps. This is shorter than the distance to the ice planet, so it's not going to extend the route any further.
By demolishing the trade port you just built on the lower right, you destroy the alternate route to the upper-left dead asteroid. This means that the shortest path to it from the terran is 7 jumps. This allows your trade port to expand greatly.
Always be weary of opening up shortcuts in your trade route. It'll take a few seconds for the game to register that you demolished a trade port. Wait for that to happen and then the longer route will re-establish itself. Also, if you put a starbase there with a trade port upgrade, that needs to be demolished as well.