The solution is what we have:  not allowing discrimination for any reason.  If fairly enforced, no one can claim preference.  Otherwise, the Supreme Court is going to have to devise a list of rights in order of priority, and tell us which ones trump the other ones, no pun intended.