Enforce that the new VertexRef is immutable.
At the moment a Vertex is an actual VertexRef and therefore by default mutable.
There is a method call getVertexRef() which just copies the (namespace,id) tuple.
Solution could be to have Vertex NOT implement VertexRef and always getVertexRef(). This allows for a immutable key. However keep in mind, that the (namespace,id) tuple of Vertex can still change.