I am not catholic and I’m not sure why what James said is anyhow a stumbling block.
Ephesians 2:8 For by grace are ye saved through faith; and that not of yourselves: it is the gift of God: 9 Not of works, lest any man should boast.
James 2:17 Even so faith, if it hath not works, is dead, being alone.18 Yea, a man may say, Thou hast faith, and I have works: shew me thy faith without thy works, and I will shew thee my faith by my works.19 Thou believest that there is one God; thou doest well: the devils also believe, and tremble.
Can you look upon another person and know what they believe? No. Can God look into your heart and know what you believe? Yes. If a person believes that God exists, and believes in Jesus, and breaks every commandment their entire life, how are they any different than satan and his angels?
To me it’s that simple. On the other hand, as Ephesians states, one can’t hope to enter Heaven by just doing good works their entire life.
If one is truly born again, they will not hide it, and their actions should reflect what it’s meant to be a christian.They both believe in Jesus, thus earning God’s grace of forgiveness, and their actions manifest the belief.