AD replacement for SIDs was broken

The nameserver never updated its table with the new Graph it created
where it replaced the old AD with the new AD.

The Graph::replace_node_at() function used to do the replacement was
also replacing an incorrect node, causing the resulting DAG to never get
updated.

Both issues are fixed with this change.