Revert "Revert "Use workaround for trivial destructor.""

This reverts commit 8effd2dd7794a8c93036dafa1786c0cc52473b07.