Geometric entities are the mothers of nodes, faces and elements (so to say) and will remember them. In turn if an entity is not the mother of a given mesh-entity it will not remember it. Therefore a body will only know about nodes which are not placed on surfaces, lines or points. A surface will only know about nodes which are not placed on lines or points. And so on.
Therefore if you need the nodes on a surface and not only the ones just inside the surface, then create a set with this surface and do a ''comp set do''. This will add the lines and points together with their nodes to the set.
On the other hand if you have only a node and you need the geometric entity in which the node is embedded you might also type ''comp set do''.