Bugfix in NodeBFS.append

Need to compare case classes by reference.