[Node] Bugfix: Only return unique leaves in 'get_leaf_nodes'