Make a Registry safe to access from multiple goroutines.

Also fix a typo in the Node impl.
this looks a bit error prone, but no better suggestions.