Revert "Only free elemnts if we go into sub-elements"

This reverts commit 4ed44cde66e7429992d8f07baa71c20236103a44.

This was fixed upstream and was actually an upstream bug