Bugfix: Memory leak in deletion of er_stack nodes of ERFilter.

The nodes of er_stack are roots of tree structures that need to be traversed and deleted. The code was only deleting the root. The fix traverses and deletes each node.