[#2016] Support addCleanup calls before tearDown.