Use sets and remove explicit index node ordering to allow tests to work regardless of the node creation order. GitLab issue #559. Signed-off-by: Roberto Rosario <roberto.rosario.gonzalez@gmail.com>