OK. Let me add what I think is going on, and then possibly an actual expert can confirm or correct me.
The bulk of tracing activity occurs in the logical network, using a ForwardStar cursor to navigate from edge to junction. But you can't really start in the logical network. You have to start from a selected feature, then get the feature's corresponding network EID and proceed from there through the network. In the first case where I select a line, which is a valid feature, it's able to move from feature to network element with no problem. And once in the network it doesn't care about any feature geometry, it just gathers up connected EIDs and then when done uses the bunch of them to select (or just highlight) associated features.
In the second case the process starts from a junction (a transformer) which then tries to inspect adjacent line features before diving into the network. It's in the course of inspecting these adjacent features that it finds one with an invalid geometry and croaks.
Am I close?
This could be. In the past, when dealing with bad network data, I've written what I've referred to as a "slow trace tool". This sort of tool lets you select a starting feature and drill through all of its connected features via a simple GUI. Such a tool would be helpful for diagnosing what you're dealing with, but alas, I no longer have this tool available (but they're pretty easy to write).