Merge branch 'jk/misc-resolve-ref-unsafe-fixes' into maint