Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision 7bd712d495f6d59945cdc6a61db9b3bd601abd17)
+++ src/Common/PassVisitor.h	(revision 4eb31f2b13d7cf03cdf3f67290325b3cf371535b)
@@ -258,8 +258,6 @@
 	~WithTypeSubstitution() = default;
 
+public:
 	TypeSubstitution * env;
-
-	template<typename pass_type>
-	friend class PassVisitor< pass_type>;
 };
 
@@ -269,9 +267,7 @@
 	~WithStmtsToAdd() = default;
 
+public:
 	std::list< Statement* > stmtsToAddBefore;
 	std::list< Statement* > stmtsToAddAfter;
-
-	template<typename pass_type>
-	friend class PassVisitor< pass_type>;
 };
 
@@ -281,8 +277,6 @@
 	~WithShortCircuiting() = default;
 
+public:
 	bool skip_children;
-
-	template<typename pass_type>
-	friend class PassVisitor< pass_type>;
 };
 
@@ -292,6 +286,8 @@
 	~WithScopes() = default;
 
+public:
 	at_cleanup_t at_cleanup;
 
+	template< typename T >
 	void GuardValue( T& val ) {
 		at_cleanup( [ val ]( void * newVal ) {
@@ -299,7 +295,4 @@
 		}, static_cast< void * >( & val ) );
 	}
-
-	template<typename pass_type>
-	friend class PassVisitor< pass_type>;
 };
 
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision 7bd712d495f6d59945cdc6a61db9b3bd601abd17)
+++ src/InitTweak/GenInit.cc	(revision 4eb31f2b13d7cf03cdf3f67290325b3cf371535b)
@@ -44,5 +44,5 @@
 	}
 
-	class ReturnFixer {
+	class ReturnFixer : public WithStmtsToAdd, public WithScopes {
 	  public:
 		/// consistently allocates a temporary variable for the return value
@@ -53,7 +53,4 @@
 		void premutate( FunctionDecl *functionDecl );
 		void premutate( ReturnStmt * returnStmt );
-
-		at_cleanup_t at_cleanup;
-		std::list< Statement * > stmtsToAddBefore;
 
 	  protected:
@@ -160,6 +157,6 @@
 
 	void ReturnFixer::premutate( FunctionDecl *functionDecl ) {
-		GuardValue( this, ftype );
-		GuardValue( this, funcName );
+		GuardValue( ftype );
+		GuardValue( funcName );
 
 		ftype = functionDecl->get_functionType();
