Measuring the transmission phase of a quantum dot in a closed interferometer