"An employer who fired an individual for being homosexual or transgender fires that person for traits or actions it would not have questioned in members of a different sex. Sex plays a necessary and undisguisable role in the decision, exactly what Title VII forbids. Those who adopted the Civil Rights Act might not have anticipated their work would lead to this particular result. But the limits of the drafters' imagination supply no reason to ignore the law's demands. Only the written word is the law, and all persons are entitled to its benefit."
Replace "homosexual or transgender" with "different caste" and "different sex" with "different race/national origin/ancestry (in California, ancestry is a protected class)" and the passage quite obviously still applies:
An employer who fired an individual for being [from a different caste] fires that person for traits or actions it would not have questioned in members of a [different race]. [Race/National origin] plays a necessary and undisguisable role in the decision, exactly what Title VII forbids. Those who adopted the Civil Rights Act might not have anticipated their work would lead to this particular result. But the limits of the drafters' imagination supply no reason to ignore the law's demands. Only the written word is the law, and all persons are entitled to its benefit.