Merge "Fix bug with deferred commits for key upgrades in temporary directories"