Teardown called on component nested in element (#1360)

WIP. Test case that passes, but fix breaks another test. For #1360.