Let's see if I have been paying enough attention to the SQL gurus. The planner is making a different estimate of how many deprecated<>'' versus how many broken <> ''. I would try SET STATISTICS to a larger number on the ports table, and re-analyze.
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend