I think you answered your own question.
Scarlatti does have a Spanish vibe to a large portion of his compositions (though not as strong as Albeniz of course

)
Bach, I believe, references himself and lots of his compositions, like a series of books, have passages that come off as nearly identical but yet completely distinct from one another!
That's what makes Bach, Bach. the ability to compose music that, to the common ear, sounds all the same. But yet when looked at closely, like fine literature, the delicate details come through as proof of his unrivaled mastery.