Whether or not drunks can consent depends on how drunk they are and what your definition of drunk may be. 

Of course, people who are unconscious through drink cannot consent, but that's an extreme form. 

Still, it was clearly inappropriate for the judge to make that point as it's a red herring in the actual case.