Fix elaboration crash with open ports