Speed up computeComposites() by using the new SubReg -> SubIdx map.