move duplicate/keyword definition checks into the pinfo object