As I mentioned earlier, among Protestants, it’s unnerving to be told we’ll be judged by our merits, as Paul plainly says in Rom 2:8-13, among many other passages. In his recent book Justification, N. T. Wright explains how this does not contradict God’s grace—
When Paul speaks of “doing the law” in Romans 2:13, he is thereby setting up a long train of thought which will run through several passages until, in Romans 8:5-8, he explains, and even then obliquely, that it is the mind of the flesh that does not and cannot submit to God’s law, so that by implication the mind of the Spirit can and does make the submission. This, in turn, points on to Romans 10:5-13, where the “doing the Torah” spoken of in Leviticus is explained in terms of Deuteronomy 30, and, further, in terms of Joel 2:32, the passage about the outpoured Spirit.
And, coming back once more to chapter 2, when we read Romans as a whole we can see quite clearly that those in Romans 2:26-29 who “keep the commandments of the law” even though they are uncircumcised (Romans 2:26), who actually “fulfill the law” (Romans 2:27), are Christian Gentiles, even though Paul has not yet developed that category. …
There are, of course, some good reasons for thinking that Paul might after all be referring to the “moral pagan.” He may indeed be quite deliberately teasing at this point, wooing a reader on from the challenge in 2:1 to the possibility of a different way of approaching the whole moral task. But the forward echoes to 2:26-29 and 2 Corinthians 2 must be regarded as decisive. These people are Christians, on whose hearts the Spirit has written the law, and whose secrets, when revealed (see Romans 2:29 again), will display the previously hidden work of God.
Pages 190-191 (emphasis in original).