Also worth noting that fully enclosed pits aren't actually that common as topographic features, fluvial erosion will usually ensure all points on land have a downward slope to the sea in at least one direction, so for most cases the ambiguity just isn't much of an issue; it's usually obvious which way is downslope if you assume any closed loops represent peaks and any water features will be lower than their surroundings. And there are some conventions for showing the occasional exceptions when they occur, which is more economical (in terms of printing cost and whatnot but also visual clarity) than altering the appearance of all contours to account for them.