Fix crash in MOAITextureBase::OnInvalidate() during shutdown