Merge "Avoid overwriting shared library file that is open"