mapping_tdb: use the correct sid for the key creation