Step 1 Whisk the egg yolks in a large heavy-bottomed saucepan (away from heat). Add two-thirds cup of the sugar, 2 1/2 tablespoons of the cornstarch, the flour, salt and milk, whisking until blended, then cook over medium heat, whisking constantly until thick and bubbly, about 5 to 6 minutes. Do not overheat or the yolks will scramble. If necessary, pull the pan off the heat occasionally.
Step 2 Remove the pan from the heat and add the butter, whisking until well blended. Pour into a bowl and cover with plastic wrap. Chill for 30 minutes, then stir in the vanilla.
Step 3Arrange half the blueberries in the bottom of the prepared crust. Spoon the chilled vanilla custard over. Chill in the refrigerator while you make the topping.
Step 4Combine the remaining 4 tablespoons sugar, the remaining 1 tablespoon cornstarch and the water in a small saucepan. Stir in the remaining blueberries. Heat to boiling, stirring until thickened and clear. Let the blueberries cool to warm, then spoon over the top of the vanilla custard. Chill 4 to 6 hours or overnight before serving.