Fix crash when MP4FileStream causes ProcessEvents to fire mid-shutdown