Parser: Global single-segment paths should be represented as PatEnum

Fixed #15774.