Merge branch 'jk/tempfile-active-flag-cleanup'