Index identity map by type and ID.