Take advantage of UUIDs as ref IDs

This enables us to distinguish between different versions of the same
resource.