Disable tests and etc. when destroying framebufs.

Fixes #6678.  May fix problems loading savestates as well.