This is a nod to the "Which Barney is the Real Barney in HL1" discussion that is probably still going on in a number of forums. The "Blue Shift" expansion answers it clearly -- the Barney you see in the tunnel at the very beginning of HL1 is the real Barney, but some people still don't believe it. Since you never interact with that Barney in the tunnel, that Barney never offers to buy you a beer, and thus the Barney in HL2, who references that line, can't be the same Barney. (Not to mention Blue Shift was made by another company, and some fans don't accept it as canon.)|
Of course, the beginning of HL1 does not represent the first time Gordon Freeman has visited the Black Mesa Complex, and thus the tunnel Barney may have offered to buy Freeman that beer on any other number of prior occasions. This is the sort of thing that dorks, such as myself, tend to discuss in great detail.
As far as my comic goes, Valve actually does a fine job in HL2 of making sure you don't have duplicates of the same extra on the screen at the same time. I think I may have seen it happen once or twice, but I'm really not sure.