Another simplification. DeclGen already has `decl_index` which can be used to retrieve the `*Decl` if needed.