Melt butter in a large saucepan over medium heat.
Add the onion and garlic and sauté for 5 minutes until translucent. Do not let the onion brown.
Add the flour and whisk until mixed through the butter. Pour 1 cup of milk in and whisk until it starts to thicken (around 1½ minutes), then pour the remaining cup of milk in. Whisk until it thickens - around 1 to 1½ minutes. Then add the chicken stock, and 1½ cups of water and whisk until combined.
Increase heat to medium high and add the potatoes into the soup. Cook for 10 to 12 minutes , whisking fairly regularly to ensure the soup doesn't stick to the bottom of the saucepan. The soup will thicken as it cooks. Use the remaining ½ cup of water if the soup gets too thick before the potato has finished cooking.
Just before the potato has finished cooking, add the corn in
While the potato is cooking, heat olive oil in a small fry pan over high heat. Add the ham and sauté for 1 - 2 minutes until nicely browned. Remove fry pan from the heat and set aside.
When the potato is cooked (tender but still holding its shape), remove the soup from the stove and stir through most of the thyme and ham
If the soup is too thick for your liking, use water (or milk) to get the soup to your desired consistency. Add the salt and 5 grinds of black pepper, then do a taste test and adjust the saltiness if required.
Serve, garnished with remaining thyme leaves and ham.