Fix issue where a node will be freed multiple times (dirty hack).