added a test for leaks after modify_copy