To satisfy @oleg-nenashev, using Jenkins.getItemMap trick from #6 where it is possible—for top-level jobs—falling back to a regular (permission-checking) ItemGroup.getItem where it is not—for jobs in folders.