I'm still having trouble duplicating the problem, but I probably don't have everything setup the same way. From my experience doing custom capabilities, once you set them they are stored in the database. I haven't looked into this plugin, but I'm guessing you can disable it and it keeps all the roles. Because it doesn't play an active role, it just sets them when you hit save.
If you notice nextgen-gallery/admin/upload.php lines 38 and 41, this seems problematic to me. We already did the admin bootstrap by changing the ngg-config.php, then the uploader is unsetting the user, then calling the admin bootstrap again. The author even admits, "don't ask me why". It looks to me like the whole uploader for NextGEN needs to be refactored. This is actually why I put in the disclaimer. It looks like NextGEN's uploader is a bunch of hacks.
I'm personally not a huge Contact Form 7 fan, but I use it anyway. But from a developer's perspective, it looks they are loading files properly. They have dozens of php files, but they are only loading the ones that are needed. Look at contact-form-7/settings.php line 11. This is a very good thing. It improves website performance and reduces server memory usage. If there are other plugins that don't load the WordPress bootstrap properly then shame on them. They either need to learn how to program or stop being lazy. I'm struggling not to rant more. :)
Sorry, I couldn't help figure out any more with your capabilities problem. Anyone else having this problem with capabilities?