Consider this passage from Romans 9:
What shall we say then? That Gentiles, who did not pursue righteousness, attained righteousness, even (BI)the righteousness which is by faith; 31but Israel, (BJ)pursuing a law of righteousness, did not (BK)arrive at that law. 32Why? Because they did not pursue it by faith, but as though it were by works. They stumbled over (BL)the stumbling stone,
Here, Paul uses the term "works" in verse 32. Is he referring to "good works" or to "works of the Law of Moses"?
While a "good works" reading may fit better with received reformed tradition, the "works of the Law of Moses" reading works much better with the context. In the preceding verses, Paul has argued that Gentiles are to be now included in the family of God. The line of reasoning is the same as in relation to Ephesians 2 - Paul is clearly focusing on the fact that the family of God is to be understood as not exclusive to Jews. And what is the boundary marker between Jews and Gentiles? Good works? No - works of the Law of Moses.
Paul is not saying (in this Romans 9 text) that Jews "stumbled" because they tried to "get saved by doing good works". That is an anachronistic projection of a 17th century issue into Paul's time - the Jews of Paul's day were not "pelegians", they believed their status as members of God's family was theirs by birthright.
No. Paul is saying that the Jews stumbled because they believed that they had an ethnically grounded right to membership in God's family. And although this is sometimes lost in 21st western thinking that does not respect the specifics of Palestinian culture of the times, it was the Law of Moses that functioned to demarcate the 1st century Jew from his pagan neighbour.
And this line of reasoning is significantly bolstered by this statement, dictated a few short breaths later by Paul:
Brethren, my heart's desire and my prayer to God for them is for their salvation.
2For I testify about them that they have (A)a zeal for God, but not in accordance with knowledge. 3For not knowing about (B)God's righteousness and (C)seeking to establish their own
The "them" in verse 1 is clearly national Israel. And what is Paul saying? That they were seeking salvation that was limited to Jews - their "own" salvation. This take on this text is further strengthened by what Paul goes on to say:
For (P)there is no distinction between Jew and Greek; for the same Lord is (Q)Lord of (R)all, abounding in riches for all who call on Him;
This is an ethnic argument, not a "good works" one. The whole context of the latter half Romans 9 through the first half of 10 is dealing with the Jew - Gentile division, not "good works".
So when Paul declares that Christ is the end of the law for righteousness, he is not in away commenting on the relationship between good works and being declared righteous, he is saying that the time for seeing the Law of Moses as enabling only the Jew to be seen as righteous has come to an end.