Key off the envelope when the VAG/etc. ends

Fixes Yu-Gi-Oh Tag Force GX 3 hanging in some places, and fixes #2801.

I tested other games using VAG/etc. and they seemed fine to me, but this could probably use more testing.  Probably need extensive SAS autotests, really...

-[Unknown]