Gal. 5:4-5Works of the law is not synonymous with "doing". Works of the law are only works of the actual law, in this case, specifically circumcision, since the verse before the ones you quoted says
"Christ is become of no effect unto you, whosoever of you are justified by the law; ye are fallen from grace.
For we through the Spirit wait for the hope of righteousness by faith."
Sounds like a warning to me! Your "doing" is not going to get you there.
Galatians 5:3 Again I declare to every man who lets himself be circumcised that he is obligated to obey the whole law.
The idea with circumcision was not to earn salvation, but to fulfill the old covenant. No one ever spoke about earning.
So you are saying the "works of the law" is not the "doing of the law."
All the "works of the law" had to be done, as in "doing."
Paul is pointing to circumcision as it was the immediate problem. They were making the ceremony of circumcision a must for salvation. Concerning salvation, as Paul was addressing with the Galatians, the "works of the law" is anything other than faith.
Paul is plainly telling the Galatians they cannot earn salvation by the law, which is doing. He says it is by faith.
You are trying to confine "works" to only be the law, not so. Works is doing anything other than faith for salvation.
"Even so then at this present time also there is a remnant according to the election of grace.
And if by grace, then is it no more of works: otherwise grace is no more grace. But if it be of works, then it is no more grace: otherwise work is no more work."
If you add any type of works with grace, it is no more grace. It's the same thing Paul is saying to the Galatians.