Optimize depthstencil renderbuffer reattachment, fix ARB_debug_output error