When replacing/machining the cylinder head
Lift out the valve lifters. Use a magnet or suction cup.
Remove the thermostat housing and transfer it to the new cylinder head.
NOTE:
Pay attention so that the contact faces are not damaged.