Ensure nested scopes are destroyed top-down, while context hierarchy is destroyed bottom up. See #96