robusting Component::getNearestPort
added ground
export netlist considering ground and arbitrary components