Do more optimizations based on sdb_set_owned