ImageRender in mutated scene not working

Hey all!

Another day and another problem I stumbled on…
I am working on a game where I would like to get a texture based on the viewport for light refraction effects.
But when I appended the stuff I needed for that from my refraction example file and started the game engine I reveived a RuntimeError. After sometime of experimenting I figured out that it was because I mutated my game scene with a custom class. So I tested this in my example file and it turned out that ImageRender won’t work anymore after subclassing the scene.

The mutated game scene is essential for the game, so does maybe anybody know how to get around this bug?

Example file: http://www.mediafire.com/download/cgag7a9j4s0lt2w/refraction.blend
-Press P and see how it works
-Press Esc to quit
-In the logic editor on the “refraction_camera” object connect to always sensor with the python controller
-See how it doesn’t work (and error messages in the console)