This was computed on the fly before and passed as an argument. Now we precompute it in context.rs, and just pass codegen_items() as an argument.
We should be able to remove that argument altogether and just call codegen_items when needed, given we also pass the context pretty much everywhere.