Note that in many states, caste and other ancestry discrimination is unambiguously protected. There have been any number of suits claiming the Civil Rights Act prohibits caste-based discrimination; I don't think there are any high-level rulings about whether it does, but the basic argument doesn't seem implausible.