Integration tests: fix teardown calls order.