normalize and fully qualify some entity references