The rule of law generally works for the best. It's what prevents salvers from disturbing the wrecks at the bottom of Ironbottom Sound and other Navy wrecks.
The practical solution is to go to the Spaniards before any salvage is attempted and cut a deal to share what is recovered. I agree it sucks in this case the Spaniards took it all.