As Ajish pointed out, you got lucky in this case. However, in general I would use a couple of tri state buffers or an inverse multiplexer to solve this. You could tie the inputs to the buffers together on the Tx line of your master and the outputs together on the Rx line of your master. Then just use a few GPIO ports to select which buffer to enable/disable.