Preheat oven to 200C and defrost puff pastry sheets. Line two trays with baking paper and lay the pastry sheets on top. Prick the pastry all over with a knife or a fork and bake for approximately 10 minutes, or until the pastry is golden. Remove pastry from oven and while still warm, take a clean kitchen towel and gently deflate the pastry then allow it to cool.
Line a 23cm square tin with aluminium foil, extending it over the sides so you can use it as handles to remove the slice when cool. Place one sheet of pastry in base of tin, top side down.
Combine the sugar, corn flour and custard powder in a saucepan, then gradually add half of the milk and whisk until smooth. Add the rest if the milk, and the cream and stir over medium heat until the mixture boils and thickens. Reduce heat to low, add butter and vanilla and whisk until butter is melted and mixture is smooth. Remove pan from heat, and then whisk in the egg yolks, until combined.
Spread custard over the pastry in the tin and then place the second pastry on top (top side down) and then allow to cool. Combine icing sugar and water, mixing until smooth the spread over the top of pastry. Cut into 16 portions and serve.