Rewrote cancel-infer to be node-centric. Much simpler rules for its operation now.