The operation recursively navigates an object hierarchy from leaf to
root, building up a sequence of the leaves visited that are (should then
be) returned. The following is a sanitised execution trace taken from
the console window:

It can be seen that <SigF> has not been added to result, and indeed
result now appears to be null rather than the Sequence expected, hence
the error reported by the system in trying to apply the add operation.

If the code of the operation is modified slightly such that we do this
within the 'else' branch:
var result : Sequence(Signal) := Sequence{};
next := self.getWhole().getBusAttributes();
('again on ' + next.asString()).println();
'-----'.println();
result := next.navigateToRoot();
('result = ' + result).println();
('sig = ' + sig.asString()).println();
result.add(sig);
return result;