C++11 DECLREF bug fix.