Your taking an argument for absolution from OT Covental law and trying to argue something outside the context of the argument. Note in Chapter 2:17 Paul starts on the contrast from OT Law as the Jews felt need to adhere to it. It is from this context the passage can be viewed.
Your missing the point! The law given to the Jews is the most comprehensive "good works" application of moral law ever devised by God for man. The moral law is meticulously applied to every aspect of their personal, civil and religious life and thus this constitutes "the works of the law" or what is regarded as "good works" in the most comprehensive sense imaginable. Thus the Jew represents the ultimate possible example of what "good works" compasses in every possible facit of life.
To deny that the Jew could be justified by "the works of the law" is to deny that ANY HUMAN BEING could be justified by "good works" as the Jew is the epitomy of what "good works" are about in regard to the MORAL LAW of God in every possible application to every possible aspect of human life.
This is an argument from greater to lessor. If the Jew cannot be justified by "good works" as defined by God's law then NO FLESH could justified by "good works" as NO FLESH applied the works defined by law as "good" more comprehensive than the Jew.
In Romans 2:11-24 it is the hpocrisy of the Jew that is condemned not the Law as it is that very law that God uses as the standard of righteousness to condemn those who come by "good works" on the day of judgement because it is the most comprehensive possible definition given to man in regard to what is "good" versus "bad" works.
Furthermore, Romans 3:19-21 proves that it is not this very same law which "the whole world" will be condemned by (because it is the most comprehensive application of law to every facet of man's existence) but it also MANIFESTS the righteousness of God, which cannot be restricted to just Jews and it also the same law manifest in the rightousness provided in Jesus Christ. It is this exact Law that Christ SATISFIED by his own life and therefore you cannot restrict it to the Jew unless Christ only satisfied the law for the Jew ALONE!!!!!!!
Side lining the "works of the law" as for Jews only, side lines God's own righteousness. Side lining the "works of the law" as for Jews only, side lines the righteousness of Christ" for Jews only as it is this very law that defined HIS OWN LIFE as righteous and satisfactory unto God FOR US!
Paul's point is that if the Jew cannot do "good works" in God's sight to justify him than NO FLESH can as the Jewish life is the most COMPREHENSIVE application of God's moral law to the life of human beings ever attempted on planet earth among any people. If the Jew cannot be justified by "good works" NO HUMAN BEING CAN.
This is why Paul goes back to Abraham BEFORE MOSES, to a gentile BEFORE THE JEWS, to one defined as "ungodly" (v. 5) to clearly demonstrate that justification by faith cannot be inclusive of "good works" as defined by the TEN COMMANDMENTS given to Moses as the basis of all law in the Old Covenant.