Clean up stolen references and leaked objects inside File and FileSystem