Nation-States abrogate treaties all the time. Ask the Native Americans of North America how many times official treaties were abrogated by the British, Canadian, American, and Spanish and Mexican governments. (Not just the United States gov, btw.)
Since the day when private enterprise is willing to take the risk in not only paying for going to the Moon or elsewhere, and coming back, but also to invest in the necessary economies of scale to make a viable profit in the venture and return, I'd say we have a lot of time to consider the legal and moral aspects of the issue.
But don't bet the house on it! IOWs, by the time private interests ARE able to reasonably, securely, and with minimal risk exploit the mineral(or other) resources of the Moon, Mars, the asteroids, or whatever, the laws will be squarely and solidly in place to ensure that the largesse is shared and to the benefit of all humankind.
Like it or not, that will most likely be the case.
Comparisons to maritime law will probably prove to be irrelevant. While the analogy of seafaring to spacefaring is an elegant one, the fact remains that spacefaring is unprecedented in the history of Man. (We had 'seafared' thousands of years before Columbus and the Age of Discovery.)
There's no way in Hell or on Earth, that any country- the US, Russia, China, India, Japan, or freakin' Guinie Bissau are going to sit by and watch other nations or private corporations rape and reap the resources beyond the Earth. It simply won't happen that way because of modern communications; contemporary mores; opinions, and ways of thinking.
To this day, some countries have tried to make viable claims on Antarctica. Sweden, Russia, Japan, and others. None of those claims are recognized by the International Community. Same will happen for space resources, in my opinion.
Nevertheless, at the rate we're going, it's going to be centuries, if not millennia, before we have to seriously consider such thorny space-law legal issues. And by the time it matters, we'll probably be some kind of socialist united humanity anyway, hundreds-if not thousands- of years after we are all dead and buried.