Optimised saving to find nodes that already exist.