TXI loses $23.7 million in first quarter