I'll look at fixing this bug. Currently any item which doesn't have a priority is assigned the priority B for the purposes of sorting. It seems as though that default is leaking through to the grouping, which isn't right.
D***, that should've been 'g p > p', but you probably knew that.
p.s. I don't see 'g' in Search Syntax in the User's Guide. Is it Scheme? The search isn't enclosed in parens.