Prevention of liquid metal attack of thermocouples