Better tempids allocation scheme, :db/id for maps optional