The new node data structure has a slot for the node's parent. We must make sure that it is correctly initialised when the node is created. Currently, this happens in two places.
% start node node_initial(N) :- start_state(S), node_new(N), node_state_of(N,S).
sl2nl([S|Y],[N|NL]) :- node_new(N), node_state_of(N,S), sl2nl(Y,NL).