Direct sums of trace maps and self-adjoint extensions