Fix #42

This replaces the `std::unordered_set` for the comtempraries with an `std::set` ordered by the height of nodes in the tree. This seems to solve #42 but inceasese runtime by a factor of about 2:


Command | Equal results | time fix_issue_42 | time fix_issue_42 | memory fix_issue_42 | memory fix_issue_42
------- | ------------- | ----------- | -------- | ------------- | ---------
scrm 2000 1 -r 10 100 -l 50 -L | Yes | 0.69s | 0.69s | 2399kb | 2401kb

Command | Equal results | time stable | time fix_issue_42 | memory stable | memory fix_issue_42
------- | ------------- | ----------- | -------- | ------------- | ---------
scrm 2000 1 -r 10 100 -l 50 -L | No | 0.37s | 0.7s | 2208kb | 2398kb