I tried to avoid the bug (not really fix it) by calling get_parent_did
instead of DefIdTree::parent
to get the parent hir_id: https://github.com/rust-lang/rust/pull/72039
But now it fails in other tests with a
error: internal compiler error: src/librustc_mir/monomorphize/collector.rs:761: cannot create local mono-item for DefId(15:5 ~ nested_fn_macro[8787]::n[0]::p[0]::f[0])
If anyone with experiences around macro and lowering has some spare time, i could really use some help :)