James is not using the word "justified" here to mean "accounted as righteous" but is shown to be righteous. James is discussing the evidence of faith (says-claims to have faith but has no works/I will show you my faith by my works - James 2:14-18) and not the initial act of being accounted as righteous with God (Romans 4:2-3). Works bear out the justification that already came through faith.
In the Strong's Exhaustive Concordance of the Bible, the Greek word for justified "dikaioo" #1344 is:
1. to render righteous or such he ought to be
2. to show, exhibit, evince, one to be righteous, such as he is and wishes himself to be considered
3. to declare, pronounce, one to be just, righteous, or such as he ought to be
In Matthew 12:37, we read - "For by your words you will be justified, and by your words you will be condemned." This is because our words (and our works) reveal the condition of our hearts. Words/works are evidences for, or against a man's being in a state of righteousness.
God is said to have been justified by those who were baptized by John the Baptist (Luke 7:29). This act pronounced or declared God to be righteous. It did not make him righteous. The basis or ground for the pronouncement was the fact that God IS righteous. Notice that the NIV reads, "acknowledged that God's way was right.." The ESV reads, "they declared God just.." This is the "sense" in which God was "justified." He was shown to be righteous.
Matthew 11:19 "The Son of Man came eating and drinking, and they say, 'Behold, a gluttonous man and a drunkard, a friend of tax-gatherers and sinners!' Yet wisdom is justified/vindicated/shown to be right by her deeds."
So the initial act of being accounted as righteous with God (justified) is a one time thing and creates no dilemma for OSAS.