thomasgriffin/TGM-Plugin-Activation — comment on commit 5a1f369a2ff4059f40278a7ea83da51d804d8433
File: tgm-plugin-activation/class-tgm-plugin-activation.php line 536
By GaryJones:

This gets unset, even if there was a problem activating the plugin? It should only be removed if the plugin was successfully activated automatically.
What you may want to do is set a `$plugin['activated']` flag if there's no wp_error above, and check against that here.