Remove computation of pkg_index and req_map

because they are already passed into the `render_tree` function.