Catching the bug in denoiser

This revision won't compile or will give you a runtime-error/crash. It
is kept only for historical purpose. I'm catching a bug