In a large, heavy-bottomed pot over medium heat, melt butter and add onions and pepper. Sauté vegetables until tender, about 6 minutes. Stir in garlic and mustard powder and cook 1 minute more. Sift in flour and stir with a wooden spoon for about 3 minutes, coating vegetables evenly. Switch to a whisk and gradually pour in milk while whisking. Add chicken stock and beer and bring up to a simmer, stirring often. Once simmering, stir in cheddar cheese and reduce heat to medium-low, stirring until melted. Add cayenne, if using and season to taste. Ladle into bowls and garnish with cheese.