Bug 839538 - Fix a cycle for the teardown sequence

--HG--
extra : rebase_source : 1858571c5f1bac5f8377a655fa8e19ae87052674