I'm puzzled that you describe this as a hypothetical.
For example, the culture I live in is pretty confident that five-year-olds are so much less capable than adults of acting in their own best interests that the expected value to the five-year-olds of having their adult guardians make important decisions on their behalf (and impose those decisions against their will) is extremely positive.
Consequently we are willing to justify subjecting five-year-olds to profound inequalities.
This affects my ideas of equality quite a bit, and always has. It is indeed OK to discriminate "against" them, and to treat them differently legally, and to not invite them to dinner, and always has been.
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
(I plan to make these threads from now on. Downvote if you disapprove. If I miss one, feel free to do it yourself.)