Influence of the intermediate material on the singular stress field in tri-material junctions