Merge branch 'rs/unpack-trees-reduce-file-scope-global' into maint