Merge "Add missing FlushCloseOutputFiles to CompileImage"