Isolating a test case from JET.@report_opt

I am trying to find a type instability using JET.jl. The top-level code is inferred, but JET.@report_opt reports a couple of instabilities that do not appear to affect the final type, yet cause allocations and runtime dispatch.

Eg an extract from the output looks like

│││││││┌ aggregates_for_shocked_cohort(trc::SectorHumanCapital.TransitionResidualsCalculator{…}, Ps::OffsetVector{…}, cohort_recipe::SectorHumanCapital.CohortRecipe) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/transition.jl:601
││││││││┌ mapreduce(f::SectorHumanCapital.var"#272#275"{…}, op::typeof(merge), itr::Base.Generator{…}) @ Base ./reduce.jl:307
│││││││││┌ mapreduce(f::SectorHumanCapital.var"#272#275"{…}, op::typeof(merge), itr::Base.Generator{…}; kw::@Kwargs{}) @ Base ./reduce.jl:307
││││││││││┌ mapfoldl(f::SectorHumanCapital.var"#272#275"{…}, op::typeof(merge), itr::Base.Generator{…}) @ Base ./reduce.jl:175
│││││││││││┌ mapfoldl(f::SectorHumanCapital.var"#272#275"{…}, op::typeof(merge), itr::Base.Generator{…}; init::Base._InitialValue) @ Base ./reduce.jl:175
││││││││││││┌ mapfoldl_impl(f::SectorHumanCapital.var"#272#275"{…}, op::typeof(merge), nt::Base._InitialValue, itr::Base.Generator{…}) @ Base ./reduce.jl:44
│││││││││││││┌ foldl_impl(op::Base.MappingRF{…}, nt::Base._InitialValue, itr::Base.OneTo{…}) @ Base ./reduce.jl:48
││││││││││││││┌ _foldl_impl(op::Base.MappingRF{…}, init::Base._InitialValue, itr::Base.OneTo{…}) @ Base ./reduce.jl:58
│││││││││││││││┌ (::Base.MappingRF{SectorHumanCapital.var"#93#94"{…}, Base.MappingRF{…}})(acc::Base._InitialValue, x::Int64) @ Base ./reduce.jl:100
││││││││││││││││┌ (::Base.MappingRF{SectorHumanCapital.var"#272#275"{…}, Base.BottomRF{…}})(acc::Base._InitialValue, x::GroupInformation) @ Base ./reduce.jl:100
│││││││││││││││││┌ (::SectorHumanCapital.var"#272#275"{…})(gi::GroupInformation) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/transition.jl:605
││││││││││││││││││┌ recalculate_newborn_occupations!(mli::SectorHumanCapital.MassLifecycleIterator{…} where TB<:SectorHumanCapital.MassLifecycleBuffers) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/mass_evolution.jl:713
│││││││││││││││││││┌ logsumexp(a::SectorHumanCapital.UWContainer) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/mass_evolution.jl:73
││││││││││││││││││││┌ mapfoldl(f::typeof(identity), op::typeof(logincexp), a::SectorHumanCapital.UWContainer) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/mass_evolution.jl:63
│││││││││││││││││││││┌ kwcall(::NamedTuple{…}, ::typeof(mapfoldl), f::typeof(identity), op::typeof(logincexp), a::SVector{…} where {…}) @ StaticArrays /home/tamas/.julia/packages/StaticArrays/xEhFV/src/mapreduce.jl:257
││││││││││││││││││││││┌ mapfoldl(f::typeof(identity), op::typeof(logincexp), a::SVector{O, T} where {T, O}; init::Any) @ StaticArrays /home/tamas/.julia/packages/StaticArrays/xEhFV/src/mapreduce.jl:257
│││││││││││││││││││││││ runtime dispatch detected: Size(a::SVector{O, T} where {T, O})::Size
││││││││││││││││││││││└────────────────────
││││││││││││││││││││││┌ mapfoldl(f::typeof(identity), op::typeof(logincexp), a::SVector{O, T} where {T, O}; init::Any) @ StaticArrays /home/tamas/.julia/packages/StaticArrays/xEhFV/src/mapreduce.jl:257
│││││││││││││││││││││││ runtime dispatch detected: StaticArrays._mapfoldl(f::typeof(identity), op::typeof(logincexp), StaticArrays.:(:), init::Any, %1::Size, a::SVector{O, T} where {T, O})::Any
││││││││││││││││││││││└────────────────────
│││││││││││││││││┌ (::SectorHumanCapital.var"#272#275"{…})(gi::GroupInformation) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/transition.jl:605
││││││││││││││││││ runtime dispatch detected: SectorHumanCapital.recalculate_newborn_occupations!(%70::SectorHumanCapital.MassLifecycleIterator{…} where TB<:SectorHumanCapital.MassLifecycleBuffers)::Any
│││││││││││││││││└────────────────────
│││││││││││││││││┌ (::SectorHumanCapital.var"#272#275"{…})(gi::GroupInformation) @ SectorHumanCapital /home/tamas/research/SectorHumanCapital.jl/src/transition.jl:607
││││││││││││││││││ runtime dispatch detected: SectorHumanCapital.aggregates_from_MLI(%70::SectorHumanCapital.MassLifecycleIterator{…} where TB<:SectorHumanCapital.MassLifecycleBuffers, %78::SortedVector{Int64, Vector{Int64}, Base.Order.ForwardOrdering}, %79::Int64)::Dict{@NamedTuple{…}, SectorHumanCapital.MassAggregates{…}}
│││││││││││││││││└────────────────────

Now I am not really sure how to investigate those. Can I get an isolated test case from any of those lines that I can try debugging? Or at least display all the information that is elided with {...}?