This is needed in order to support wildcard indexes. Also add unittests for this, both for the regular insert as well as bulk builder insert.