His lack of obedience would either be proof that he was never really legally justified in the first place, or he stopped believing somewhere along the line and was no longer legally justified. Take your pick. The absence of works, which James calls 'dead faith', signifies the absence of the Spirit in justification/salvation. That's why dead faith is not saving faith. And why his argument is a different matter altogether than Paul's faith 'apart from works' argument.
Paul refers to redemption not justification