If Abraham was indeed justified by works, he had something to boast about, but not before God.
Εἰ γὰρ Ἀβραὰμ ἐξ ἔργων ἐδικαιώθη, ἔχει καύχημα, ἀλλ᾿ οὐ πρὸς τὸν Θεόν.