Try and fix invalid framebuffer depth/stencil setup, Thanks Ivoforce. Closes #1032