Fix node config check

Fixed the node configuration check so that removing a node at the end
of the list is noticed.  Also added a bounds check for when a node gets
added.