This still needs a test for making sure no memory is leaked when descendant elements have data attached.