Another point is that we probably don't want to allow redefinitions, so we may just add a `require(!reg.contains(key))`