I considered having an ID table that maps stable IDs to the actual pointers to nodes. Then everything could go through that.
But considering how much pointer-chasing is already going on, it feels like adding another layer of indirection would be messy and possibly also slow?