Sorted the lines dealing with tool finalization so that we are not failing...
...because of change in the ordering
As the order to tool finalization is cound to change when moving to functionnal, this avoids cumbersome changes in the ref files It also allows to keep them more in sync with master