graph: Provide access to the package record in the emit functions.