Add try/finally in tests to make sure teardown() is called.
Merge remote-tracking branch 'upstream/develop' into lc_fix