Second commit potentially supersedes !712 (closed): @hamano, can you retests in your environment to make sure it's covered?