The range measured in the DME system is called "Slant" range. But does what it shows really matter? For example, the "four mile" check on an ILS is a gross error check. But when really crucial distances are put on charts there is a fudge factor built in as well as an understanding about what the DME will be showing at that particular point. So you are absolutely right, the numbers may be rubbish but it doesn't really matter.
PM