Bugfix
* Fix an issue where resource is never freed when running one particular
test suite with an alternative AES implementation. Fixes #4176.