How do I construct a Pattern with Alternatives and PatternSequence without getting Pattern::patvar messages?

It seems like a glitch in the pattern matcher, occuring whenever named patterns appear in a head and PatternSequence appears at level 1 in the body.

Null /. f_[PatternSequence[x, y]] -> 0

Pattern::patvar : First element in pattern Pattern[1, _] is not a valid pattern name. >>

When there are multiple named patterns in the head there are additional warnings with different numbers:

Off[General::stop]

Null /. f[a_, b_, c_, b_][PatternSequence[x, y]] -> 0

Pattern::patvar : First element in pattern Pattern[1, _] is not a valid pattern name. >> Pattern::patvar : First element in pattern Pattern[2, _] is not a valid pattern name. >> Pattern::patvar : First element in pattern Pattern[3, _] is not a valid pattern name. >> Pattern::patvar : First element in pattern Pattern[2, _] is not a valid pattern name. >>

Note how the numbers in the messages follow the same sequence as the pattern names. It looks like the named patterns are internally associated with integer values and somehow the presence of PatternSequence in the body causes those integers to be processed as names.

I'm pretty sure this is unexpected behaviour and should be reported to Wolfram.