Fixed #5831 (FP in 1.65: call of pure virtual function 'throw' in destructor)
Merge branch 'master' into travis_advanced