Note this is a separate patch I can break out, but when I previewed it GH automatically merged the PRs?

See detailed commit message for more info, but essentially memfiles.open() would in some cases (e.g., in my case when not running as root on OS X) create an mmap file but without any read/write privileges, preventing it from being re-opened.