Slightly better handling of vApp reference deinitialization