make grammar handle grouped types as qualifying types for #921
clean up grammar slightly