Merge "bug 7253033 clean up before closing an output" into jb-mr1-dev