Index: src/InitTweak/FixInit.cc
===================================================================
--- src/InitTweak/FixInit.cc	(revision 4741dfe074ccc55bc19d7ab13693524d07c040b1)
+++ src/InitTweak/FixInit.cc	(revision 546e712c18fe907ee1619132a875d9ba32994efc)
@@ -262,8 +262,4 @@
 			// unwrap implicit statement wrapper
 			Statement * dtor = input;
-			if ( ImplicitCtorDtorStmt * implicit = dynamic_cast< ImplicitCtorDtorStmt * >( input ) ) {
-				// dtor = implicit->callStmt;
-				// implicit->callStmt = nullptr;
-			}
 			assert( dtor );
 			std::list< Expression * > matches;
@@ -291,5 +287,11 @@
 			// wraps the more complicated code.
 			static UniqueName dtorNamer( "__cleanup_dtor" );
-			FunctionDecl * dtorFunc = FunctionDecl::newFunction( dtorNamer.newName(), SymTab::genDefaultType( objDecl->type->stripReferences(), false ), new CompoundStmt() );
+			std::string name = dtorNamer.newName();
+			if(name == "__cleanup_dtor8") {
+				objDecl->print(std::cerr);
+				std::cerr << "-----" << std::endl;
+				dtor->print(std::cerr);
+			}
+			FunctionDecl * dtorFunc = FunctionDecl::newFunction( name, SymTab::genDefaultType( objDecl->type->stripReferences(), false ), new CompoundStmt() );
 			stmtsToAdd.push_back( new DeclStmt( dtorFunc ) );
 
@@ -304,5 +306,9 @@
 				replacement = new CastExpr( replacement, base->clone() );
 			}
-			DeclReplacer::replace( dtor, { std::make_pair( objDecl, replacement ) } );
+			size_t replaced = DeclReplacer::replace( dtor, { std::make_pair( objDecl, replacement ) } );
+			if(replaced == 0) {
+				std::cerr << "Failed to replace " << objDecl << std::endl;
+				abort();
+			}
 			dtorFunc->statements->push_back( strict_dynamic_cast<Statement *>( dtor ) );
 
