On the scattering matrix of symmetrical waveguide junctions